filmov
tv
JavaScript Naming Conventions - JavaScript Tutorial 13
![preview_player](https://i.ytimg.com/vi/CZ9iNTLYhfw/maxresdefault.jpg)
Показать описание
Notes for You:: JavaScript Naming Conventions - JavaScript Tutorial 13
1. Variable name and constant name should be meaningful.
2. Keywords should never be used as variable name or constant name.
3. The first character can be an alphabet, underscore or dollar character.
4. The first character should not be a number.
5. All succeeding characters can be alphabets, digits, or underscores.
6. No special characters are allowed except an underscore or dollar.
7. More than one successive underscores or dollars should not be used.
8. Variable names and constant names are case sensitive.
9. White space is not allowed.
10. Use camel case naming convention for naming variables .
i.e. if there is a single word in a variable name, then all characters should be in lower case letters, and if there are more than one words in a variable name, then first word’s all characters should be in lower case letters and all succeeding words first character should be in upper case letter, and all succeeding characters in all succeeding words should be in lowercase letters.
11. Whereas while naming a constant, all characters should be in upper case letters, if there are more than one word in a constant, then words should be separated by an underscore character.
12. No two variables or constants should have same name in the same scope.
13. Always initialize a variable and constant, when they are declared .
14. Always use var keyword for declaring variables.
15. Always use const keyword for declaring constants.
=========================================
Follow the link for next video:
JavaScript Tutorial 14 - Data Types in JavaScript | typeof Operator in JavaScript
Follow the link for previous video:
JavaScript Tutorial 12 - Constants in JavaScript | JavaScript Constants
=========================================
JavaScript Tutorials Playlist:-
=========================================
Watch My Other Useful Tutorials:-
jQuery Tutorials Playlist:-
jQuery UI Tutorials Playlist:-
Bootstrap Tutorials Playlist:-
=========================================
► Subscribe to our YouTube channel:
► Visit our Website:
=========================================
Hash Tags:-
#ChidresTechTutorials #JavaScript #JavaScriptTutorial
1. Variable name and constant name should be meaningful.
2. Keywords should never be used as variable name or constant name.
3. The first character can be an alphabet, underscore or dollar character.
4. The first character should not be a number.
5. All succeeding characters can be alphabets, digits, or underscores.
6. No special characters are allowed except an underscore or dollar.
7. More than one successive underscores or dollars should not be used.
8. Variable names and constant names are case sensitive.
9. White space is not allowed.
10. Use camel case naming convention for naming variables .
i.e. if there is a single word in a variable name, then all characters should be in lower case letters, and if there are more than one words in a variable name, then first word’s all characters should be in lower case letters and all succeeding words first character should be in upper case letter, and all succeeding characters in all succeeding words should be in lowercase letters.
11. Whereas while naming a constant, all characters should be in upper case letters, if there are more than one word in a constant, then words should be separated by an underscore character.
12. No two variables or constants should have same name in the same scope.
13. Always initialize a variable and constant, when they are declared .
14. Always use var keyword for declaring variables.
15. Always use const keyword for declaring constants.
=========================================
Follow the link for next video:
JavaScript Tutorial 14 - Data Types in JavaScript | typeof Operator in JavaScript
Follow the link for previous video:
JavaScript Tutorial 12 - Constants in JavaScript | JavaScript Constants
=========================================
JavaScript Tutorials Playlist:-
=========================================
Watch My Other Useful Tutorials:-
jQuery Tutorials Playlist:-
jQuery UI Tutorials Playlist:-
Bootstrap Tutorials Playlist:-
=========================================
► Subscribe to our YouTube channel:
► Visit our Website:
=========================================
Hash Tags:-
#ChidresTechTutorials #JavaScript #JavaScriptTutorial
Комментарии