Last active
March 8, 2021 12:26
-
-
Save SakshiShreya/c83096a939867a360f5bbabc75e91a23 to your computer and use it in GitHub Desktop.
Js file for describing hoisting
This file contains hidden or 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
console.log(a1); | |
console.log(a2); | |
console.log(a3); | |
console.log(a4); | |
console.log(a5); | |
console.log(a1()); | |
console.log(a2()); | |
function a1() { | |
console.log('a'); | |
} | |
var a2 = function() { | |
console.log('b'); | |
} | |
var a3 = 1; | |
let a4 = 2; | |
const a5 = 3; | |
console.log(a1); | |
console.log(a2); | |
console.log(a3); | |
console.log(a4); | |
console.log(a5); | |
console.log(a1()); | |
console.log(a2()); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Update a2 function