Var
Last updated
Last updated
Var is a variable that allows you to set the variable and be able to redefine it multiple times, below is an example of redefining variables
This variable type is useful because it allows us to reuse it multiple times, unlike other variable types like let, and const which cannot be redeclared more than once.
So we can create a variable, that will be set when the bot starts, named MyName
and set it to John
, notice we have redeclared this variable now it is no longer John!, then we print the new variable value which will output as Anny
.