in JavaScript by
Q:
What are the variable naming conventions in JavaScript?

1 Answer

0 votes
by

While naming your variables in JavaScript keep following rules in mind.

You should not use any of the JavaScript reserved keyword as variable name. These keywords are mentioned in the next section. For example, break or boolean variable names are not valid.

JavaScript variable names should not start with a numeral (0-9). They must begin with a letter or the underscore character. For example, 123test is an invalid variable name but _123test is a valid one.

JavaScript variable names are case sensitive. For example, Name and name are two different variables.

Related questions

0 votes
asked Sep 19, 2021 in JavaScript by sharadyadav1986
0 votes
asked Jun 30, 2020 in Python by GeorgeBell
0 votes
asked Mar 21, 2021 in JavaScript by rajeshsharma
0 votes
asked Jul 29, 2021 in Artifactory by rajeshsharma
...