var a=10;
(()=>{
c=20;
console.log(c);
var c = 40;
b = 30;
console.log(a);
})();
console.log(b);
console.log(c);
The output is
20
10
30
reference error c is not defined
Blancer.com Tutorials and projects
Freelance Projects, Design and Programming Tutorials
var a=10;
(()=>{
c=20;
console.log(c);
var c = 40;
b = 30;
console.log(a);
})();
console.log(b);
console.log(c);
The output is
20
10
30
reference error c is not defined