0

I have MyObject{internalArray:["ds","sdfs"]}

Then I call console.log(MyObject.internalArray)

Then I do MyObject.internalArray.push("weird?")

I expect output: ["ds","sdfs"]

Why do I get output: ["ds","sdfs","weird?"]

Is it something to do with hoisting?

mplungjan
  • 169,008
  • 28
  • 173
  • 236
Dudus
  • 25
  • 8

0 Answers0