Hoisting in JavaScript A-Z

var a; //declarationa = 10; // initialization
var c = 5;
var e = 6;
console.log(c);
var c;
var e;
c= 5;
e =6;
console.log(c)
console.log(c);
var c = 5;
var e = 6;
var c;
var e;
console.log(c);
c= 5;
e =6
console.log(c);
c= 5;
e =6
var c;
var e;
var c = 10;
console.log(hoisting)
hoisting(“blog”)
function hoisting(name) {
console.log(“please like this” + “ “ + `${name}`);
}
console.log(a); // undefined
//a() // not initialize
var a = () => {
console.log(“a”); //a
}
a();
console.log(a); //[Function: a]
a()
function a() {
console.log(“a”); // a
}
var a = 10;function b() {
console.log(a);
var a;
}
b();
var a ;
a =10;
function b() {
var a;
console.log(a);

}

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store