Further. Conceptual doubts

Clearly there’s more to javascript. For instance where are the oroginal definitions of otherBackpack stored? Are they cloned off originalBackpack. Does otherBackpack mutate and move away from originalBackpack?

Hi @AnanthaPad,

Good thoughts! If you checkout the Backpack Mistake explainer you can see the little bit of additional code that runs before your code runs. This defines the variable otherBackpack.

Often in coding you’re working with variables whose values you don’t get to define, this puzzle is an example of how you could handle a scenario like that.

H :slight_smile:

1 Like