📜  js 命名约定 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:02:04.750000             🧑  作者: Mango

代码示例1
//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;
};