Reversing = Sign Changes Logic

How come when I reverse the logic here and make it const myArray.pop() = removedFromMyArray, then I get an error message on the question

Your code so far

// Setup
const myArray = [["John", 23], ["cat", 2]];

// Only change code below this line

const removedFromMyArray = myArray.pop()

Challenge: Basic JavaScript - Manipulate Arrays With pop()

Link to the challenge:

For the assignment operator = the order matters

On the left goes the variable holding the value and the right goes the expression that creates the value

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.