MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/node/comments/1c3uaey/javascript_functions_4_ways/kzkpdno/?context=3
r/node • u/hoonerismsmeen • Apr 14 '24
79 comments sorted by
View all comments
Show parent comments
8
They are handled differently by the compiler when it comes to where the function is scoped in memory. Variables are treated like other variables rather than globally like a traditional function.
5 u/RaveMittens Apr 14 '24 the compilerThe interpreter? 5 u/MaxUumen Apr 14 '24 The engine 3 u/RaveMittens Apr 14 '24 The runtime 26 u/SparserLogic Apr 14 '24 The thing that does the thing. 2 u/wherewereat Apr 14 '24 The motor 2 u/SparserLogic Apr 14 '24 The fire 🔥🔥🔥 0 u/0xhjkl Apr 15 '24 the object 0 u/[deleted] Apr 15 '24 [deleted] → More replies (0)
5
the compiler
The interpreter?
5 u/MaxUumen Apr 14 '24 The engine 3 u/RaveMittens Apr 14 '24 The runtime 26 u/SparserLogic Apr 14 '24 The thing that does the thing. 2 u/wherewereat Apr 14 '24 The motor 2 u/SparserLogic Apr 14 '24 The fire 🔥🔥🔥 0 u/0xhjkl Apr 15 '24 the object 0 u/[deleted] Apr 15 '24 [deleted] → More replies (0)
The engine
3 u/RaveMittens Apr 14 '24 The runtime 26 u/SparserLogic Apr 14 '24 The thing that does the thing. 2 u/wherewereat Apr 14 '24 The motor 2 u/SparserLogic Apr 14 '24 The fire 🔥🔥🔥 0 u/0xhjkl Apr 15 '24 the object 0 u/[deleted] Apr 15 '24 [deleted] → More replies (0)
3
The runtime
26 u/SparserLogic Apr 14 '24 The thing that does the thing. 2 u/wherewereat Apr 14 '24 The motor 2 u/SparserLogic Apr 14 '24 The fire 🔥🔥🔥 0 u/0xhjkl Apr 15 '24 the object 0 u/[deleted] Apr 15 '24 [deleted] → More replies (0)
26
The thing that does the thing.
2 u/wherewereat Apr 14 '24 The motor 2 u/SparserLogic Apr 14 '24 The fire 🔥🔥🔥 0 u/0xhjkl Apr 15 '24 the object 0 u/[deleted] Apr 15 '24 [deleted] → More replies (0)
2
The motor
2 u/SparserLogic Apr 14 '24 The fire 🔥🔥🔥 0 u/0xhjkl Apr 15 '24 the object 0 u/[deleted] Apr 15 '24 [deleted] → More replies (0)
The fire 🔥🔥🔥
0 u/0xhjkl Apr 15 '24 the object 0 u/[deleted] Apr 15 '24 [deleted] → More replies (0)
0
the object
0 u/[deleted] Apr 15 '24 [deleted] → More replies (0)
[deleted]
→ More replies (0)
8
u/SparserLogic Apr 14 '24
They are handled differently by the compiler when it comes to where the function is scoped in memory. Variables are treated like other variables rather than globally like a traditional function.