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 :: flat function javascript 
Javascript :: javascript this in settimeout 
Javascript :: hoisting in javascript 
Javascript :: jest test navlink 
Javascript :: how to create a javascript hello world program with node.js 
Javascript :: js get path from url 
Javascript :: javascript set element class 
Javascript :: how to make a discord bot send a message 
Javascript :: how to slice array in angular 6 
Javascript :: moment duratuion from hours 
Javascript :: find match in array object js 
Javascript :: js add zeros before number 
Javascript :: json example list of objects 
Javascript :: how to get json array response in retrofit 
Javascript :: angularjs show form validation errors 
Javascript :: javascript on focus 
Javascript :: hooks developed by react native 
Javascript :: flatlist inside flatlist react native 
Javascript :: set up emet for jsx in vs code 
Javascript :: multiply js 
Javascript :: object find javascript 
Javascript :: function inside a class component react 
Javascript :: ajax async call with wall all 
Javascript :: strupper in js 
Javascript :: enzyme test method 
Javascript :: transformar moeda real javascript 
Javascript :: node load testing-check 
Javascript :: expo av 
Javascript :: javascript rest parameters vs spread operator 
Javascript :: HH:mm with am pm jquery 
ADD CONTENT
Topic
Content
Source link
Name
5+1 =