Created
September 6, 2018 05:05
-
-
Save praveen-me/a0e046c1f847acb67f6e5fd8b4838352 to your computer and use it in GitHub Desktop.
Scopes in JavaScript
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
function sum() { | |
var a = 5; | |
var result = 0; | |
// Declaring second function | |
function secondNumber() { | |
var b = 10; | |
return a+b; | |
} | |
//calling secondNumber() and storing it in a variable | |
var result = secondNumber(); | |
return result; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment