I am learning javascript. I find that variables can be declared using var
or let
. However, I also find that the code works well even if variables are used without any of these 2 keywords. Hence, I can use any of following:
name = "";
var name = "";
let name = "";
Why should I use var
or let
if they are not essential? Thanks for your insight.
Comments
Post a Comment