Last active
June 6, 2022 04:06
-
-
Save dikshadhote/18f6b522e449d21e8a3b63161e34757f to your computer and use it in GitHub Desktop.
Scope of variable in js
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
var number = 4; | |
function test() | |
{ | |
if (number ==8) { | |
var number = 16; | |
} | |
console.log(number ); | |
} | |
test(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment