Help! JavaScript Memory Model

Greeting…

Does anyone know that how does the JavaScript memory executing model work? As we know, a Stack stores Primitive type object and references, a Heap stores objects, what about the functions? Where a function should store then? Or what do I say was not right?:rolleyes::rolleyes: