Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

js naming conventions

//variable names, function names, and parameter names are camel case
var myVariable = 27;
var myFunction = function(myParameter){
	console.log(myParameter);
};

//constants are uppercase
const MYCONSTANT = 27;

//constructor functions are pascalcase
var MyConstructor = function(){
  this.myProperty = 27;
};
 
PREVIOUS NEXT
Tagged: #js #naming #conventions
ADD COMMENT
Topic
Name
3+7 =