What arethe rules for naming a JavaScript variable?
Answers
Answered by
2
Here is your answer-
Answer:
JavaScript has only a few rules for variable names:
The first character must be a letter or an underscore (_). ...
The rest of the variable name can include any letter, any number, or the underscore. ...
As with the rest of JavaScript, variable names are case sensitive. ...
There's no limit to the length of the variable name.
hope it help✌✌
follow me...
Answered by
1
Answer:
There's no limit to the length of the variable name.
You can't use one of JavaScript's reserved words as a variable name. All programming languages have a supply of words that are used internally by the language and that can't be used for variable names because doing so would cause confusion (or worse). Note, too, that JavaScript also has many keywords that should be avoided as well.
Similar questions