Is this means assignment in js of primitive makes primitive become object automatically?
let a = 1
just be transferred to let a = new Number(1)
, we know Number
is a function, and it's prototype has toString
, this makes sense? Is it right?
Finally, we know the primitive of js is stored in stack memory, but if we can only get object by assignment, so is it means only pointer exists in stack? I am confused. Thanks for your answers if you can help me.