Computer Science, asked by Simrana, 10 months ago

What arethe rules for naming a JavaScript variable?​

Answers

Answered by Rohitsingh9982
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 dhanushree7552
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