Javascript Naming Guidelines:: Every Constant Variable Name Should Be in Upper Case
Javascript Naming Guidelines:: Every Constant Variable Name Should Be in Upper Case
JavaScript Naming Guidelines: Function names should begin with a lowercase letter, and the first letter of each subsequent new word should be uppercase with all other letters lowercase. (camelCase) Example: function myFirstFunction ... !ll "ariables should be declared in first lines of code. #n addition, all "ariables must be declared in functions to $eep them local. %ariable names should begin with a lowercase letter, and the first letter of each subsequent word should be uppercase with all other letters lowercase. %ariable names should indicate their data type with a consistent prefix (bln & boolean' flt & floating point' int & integer' ob( & ob(ect' str & string).
Spacing
Consider the following two lines:
for(x=1;x<10;x++){y+=x;alert(x);}
+r:
Braces
*he following two lines pro"ide a demonstration: