As far as I understand, and you can correct me if I'm wrong, when you assign a variable to a function, i.e. create a function expression, the function is not assigned to the variable the same way a primitive value would be. The variable does not hold that function as a container the same way it holds a primitive value, instead, the variable simply makes a reference to that function.
So, if this is correct, I wanna know how does the invocation of a reference actually works. When you do this:
let func = function() {..}
func()
since func is not a function, but only makes a reference to a function, then how is it being invoked? Are you simply calling on that reference, func, to invoke the function?
If objects, including functions, can only be referenced, then where are they stored?
Unless it answers those specific questions, please don't bother giving me any external reading sources. I've read a lot already, but non of them actually explicitly answer these questions. They're all vague, and do not provide an explicit clear answer.
The variable does not hold that function as a container the same way it holds a primitive value, instead, the variable simply makes a reference to that function.
Not sure about your terminology of "makes a reference" here. A variable always holds a value. That value might be either a primitive value or a reference value (i.e. an object reference).
If objects, including functions, can only be referenced, then where are they stored?
Simply elsewhere in memory. It gets created by the object literal expression or function expression, and can be referenced one or many times. Objects are garbage-collected automatically in JavaScript.
How does the invocation of a reference actually work? Are you simply calling on that reference,
func, to invoke the function?
Yes, you're simply calling on that reference, which will run the code that is part of the function object.