Created
March 3, 2019 15:12
-
-
Save BolajiAyodeji/1db91e2989cf345276afd984c32cc752 to your computer and use it in GitHub Desktop.
Defining Functions
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 Declaration | |
function walk() { | |
console.log('walk'); | |
} | |
// Named Function Expression | |
let run1 = function walk() { | |
console.log('run1'); | |
}; | |
// Anonymous Function Expression | |
let run2 = function () { | |
console.log('run2'); | |
}; | |
let move = run2; | |
run1() | |
run2() | |
move() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment