const, let, var when to use what?
Up until now, you must have been using var to declare a variable in Javascript. But with ES6 came two new ways of declaring variables: let and const. But why ditch var in the first place?🤔
Let us understand using the following piece of code:
If you...
madhushreekunder.hashnode.dev4 min read
Jarrod Watts
Developer Relations Engineer @ Polygon Labs
Cool tip that var is declared globally