What are the conventions of naming a variable in JavaScript?

Following are the naming conventions for a variable in JavaScript:

  • Variable names cannot be similar to that of reserved keywords. For example, var, let, const, etc.
  • Variable names cannot begin with a numeric value. They must only begin with a letter or an underscore character.
  • Variable names are case-sensitive.

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *