What will be the result of the following code?
 function myFunction() { var a = 1; if ( a == 1 ) { var b = 2; } return b; } 
Explanation
In JavaScript 'var' declares the variable inside the scope of the function.

There isn't the function call.

2018 Sep 11, 6:28:44 AM

Follow CodeGalaxy

Mobile Beta

Get it on Google Play
Send Feedback