Jargon is freaky, yo. Let's demystify.
- scope: where you can find variables
- stack: the process of stepping through code and executing it (like the process of cooking a recipe).
- heap: where all your individual objects and trash lives (like a pantry)
- global scope: variables you can find everywhere
- block scope: variables you can only find inside a {piece} of a function
- function scope: variables you can find inside a function
- "foo" and "bar": data placeholders used w/ writing examples
- API: honestly, just a program's signature; what it can do
- for(i=0...): i is literally just a freakin counter.
There. All better.
I don't think your
stack
definition is quite right... you more described debugging.A stack in general is no different than a stack of papers: you can see and access what's on top, but if you want something on the bottom, you first have to take off what's on top.
"The" stack (as in stack trace) is a particular stack recording how code got to the current line being executed (foo called bar called baz called fizz called buzz and on down the line)