Search
 
SCRIPT & CODE EXAMPLE
 

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;
};
Comment

javascript Name convention

// camelCase 
//The general rule is to start variable, function and method names 
//with a lowercase letter, class and object names with a capitalized letter, 
//and constants are typically all caps. 
//Follow these conventions, and your scripts will 
//be consistent with what others are doing, and much easier to understand.
Comment

PREVIOUS NEXT
Code Example
Javascript :: get month from timestamp javascript 
Javascript :: react-data-table-component edit action 
Javascript :: jquery syntax 
Javascript :: lodash round 
Javascript :: arrow function 
Javascript :: isfinite javascript 
Javascript :: how to append in javascript 
Javascript :: how to convert string to number in javascript 
Javascript :: javascript is array or object 
Javascript :: set javascript 
Javascript :: arrow function javascript 
Javascript :: angular object sort by key 
Javascript :: javascript htmlcollection 
Javascript :: ${ js 
Javascript :: axios post request progress 
Javascript :: json object 
Javascript :: $$ promise then 
Javascript :: mongoose in nodem js 
Javascript :: copia array javascript 
Javascript :: decorators in javascript 
Javascript :: binary to decimal javascript 
Javascript :: vue js change delimiters 
Javascript :: prepend to js array 
Javascript :: search object array javascript 
Javascript :: Add additional css class name in react app 
Javascript :: modal slide from right 
Javascript :: javascript remove event listener after bind 
Javascript :: syntax of reduce in js 
Javascript :: hide html elements 
Javascript :: how to display words from an array in a box in javascript 
ADD CONTENT
Topic
Content
Source link
Name
6+8 =