The Art of Using var, let, and const in JavaScript — A Slightly Unconventional Approach zmjdev. The variables defined as var are not only accessible inside the block that they are defined. But also, they can be accessed outside the block as well. var considers only function blocks and global context as scopes. Let is not affected by hoisting. const is the same as let.

1m read timeFrom javascript.plainenglish.io
Post cover image

Sort: