How To Name Javascript Variables
how to name javascript variables
how, to, name, javascript, variables
How To Name Javascript Variables
Post Description: how to name javascript variables
POST# 1202
Posted On: Sat Apr 19, 2008 9:24 pm
web hosting
Topic: How To Name Javascript Variables
before you start naming your own variables, you need to be aware of javascript's naming rules. the factors you need to consider when choosing names are case sensative, invalid character and the names that are reserved by javascript. additionally you should try to give your variables names that are both easy to remember and meaningful


Javascript is Case Sensative


when naming variables remember that javascript is case sensative these variables are all different:

One word variables
Hosting
HOSTING
hosting
HostinG

Two words variables
WebHosting
webhosting
web_hosting

you get the idea.

here are some tips when using variables

if you are using a variable name that consists of only one word, it is probably easiest to user lowercase for the entire name. it will be quicker to type and you will know when you us it later to type it all in lowercase

for a variable name with two words, you might decide to capitalize the first letter of each word. for exampe, you may name a rable MyCar or My_car


No Repies
(0) Comments for How To Name Javascript Variables

What do you think?

* name:  

* email:  

* Please enter comments:


Receive Replies on my Comments
(An email will be sent to you when someone replies to your comments)

Add image to comments
yes no             upload
     
  1. How To Use Variables String In Javascript Code
  2. How To Understan Variables Strings In Javascript
  3. How To Define Variables In Javascript Code
  4. How To Assign A Value To A Variable In Javascript
  5. How To Name Javascript Variables