Rules to Declare Variables in JavaScript

Full Stack Web Development Courses with Real-time projects Start Now!!

Program 1

/*
   Rules of declare variable

1. A variable name must start with a letter or dollar($) or an underscore(_) 
2. A variable name cannot start with a digit or any other special character
3. No Space allowed in between name of variable
4. A variable name can only contain alpha-numeric characters and 
    underscores (a-z, A-Z, 0-9, and _ and $ )
5. The variable name cannot be any reserve word (key word)
6. There is no limit on the length of the variable name   
7. Varible name is case sensetive
*/

 

Did we exceed your expectations?
If Yes, share your valuable feedback on Google

courses

DataFlair Team

DataFlair Team provides high-impact content on programming, Java, Python, C++, DSA, AI, ML, data Science, Android, Flutter, MERN, Web Development, and technology. We make complex concepts easy to grasp, helping learners of all levels succeed in their tech careers.

Leave a Reply

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