Build your intuition. Click the correct answer from the options.
What will be the output of this code?
JAVASCRIPT
1var a = 10;
2
3function outerFunc(a) {
4 function inner() {
5 var b = 20;
6 console.log(a + b);
7 }
8
9 return inner;
10}
11
12var func = outerFunc(a);
13
14a = 30;
15
16func();
Click the option that best answers the question.
- 10
- 50
- 30