what exactly is a variable under the hood in javascript?

I understand that a variable that is assigned with an object is actually a pointer(reference) to object. eg x=[1,2,3,4}, here x is a pointer to the memory location where the array is stored.

But when i assign a primitive value to a variable , x=16 or x="abc", what is 'x' under the hood? Is it also a pointer(reference) to the memory where 16 is stored ? in case x is a reference here, and if i say y=x then why is the value of x is copied to y? ( if its a reference then ,y=x is suppose to make y point to the same memory location where x is pointing to right?)