As expected the console will print 15. We really go through a bunch of hoops here. I am trying to illustrate a few points here. First, a function definition can be stored in a variable, the function definition is invisible to the program until it gets called. Second, every time a function gets called, a local execution context is (temporarily) created. That execution context vanishes when the function is done. A function is done when it encounters
return or the closing bracket
I do this on various devices, too. It’s not unusual to see me at home with all 3 devices open and looking at my GTD sheet and email. Whenever I’m on a plane, I make sure to update my GTD sheet and then use it on my iPhone to look at projects while I type notes or complete tasks on my laptop. I try to be as cross-platform with it as possible. It’s a big reason why I chose it in the first place.