Hey there, description in question 23 needs a bit of adjustment
Let say new User("xyz") created a object called foo and returned now foo["location"] would be assigned value as USA and person is referencing to foo["location"].
Here, person is not referencing foo["location"], instead it is being assigned the result of Assignment Operator = which in this case returns string 'USA'. Assignment operator always returns the value of the expression on the right, as described here:
ECMAScript Specification , pt 12.14.4
Otherwise it's totally correct, thanks for great work!
Hey there, description in question 23 needs a bit of adjustment
Here,
person
is not referencingfoo["location"]
, instead it is being assigned the result of Assignment Operator=
which in this case returns string 'USA'. Assignment operator always returns the value of the expression on the right, as described here: ECMAScript Specification , pt 12.14.4Otherwise it's totally correct, thanks for great work!