Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var a = 10;
- const c = 15;
- function print() {
- let b = 11;
- const d = 20;
- c = 18; // here we got error for constant variable's value update or change
- console.log(a); // here a print as 10
- console.log(b); // here b print as 11
- console.log(c); // here c print as 15
- console.log(d); // here c print as 20
- }
- console.log(a); // here a print as 10
- console.log(b) // here b print undefined
- console.log(c) // here c print 15
- console.log(d); // here d print as undefined
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement