0
How this thing works at all
3 Réponses
+ 1
When you call the foo function, it returns(calls) bar function with b++ as argument. Here b=5 and therefore a parametrr inside bar fumction is 5. Now in bar function b is incremented by one i.e. is 6(because it's post incremented). So we have b+a= 6+5 =11.
+ 1
Vladislav Semeniuk 🐸 in last line of code you call function foo.inside of foo the first executable line is return bar (b++). After that bar function is executed.
"functions never run before you call them"
0
Qasem why return bar(b++) executes before function bar?