Created
November 8, 2018 21:10
-
-
Save AminBusiness/248c449579d8b696d4ca7f404f1bd39c to your computer and use it in GitHub Desktop.
// source https://jsbin.com/gavovuh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script id="jsbin-javascript"> | |
//What is the ouput of this function | |
var num = 4; | |
function outer() | |
{ | |
var num = 2 | |
function inner() | |
{ | |
num++; | |
var num = 3; | |
console.log(num) | |
} | |
inner(); | |
} | |
outer(); | |
</script> | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//What is the ouput of this function | |
var num = 4; | |
function outer() | |
{ | |
var num = 2 | |
function inner() | |
{ | |
num++; | |
var num = 3; | |
console.log(num) | |
} | |
inner(); | |
} | |
outer(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment