📜  如何在 javascript 代码示例中编写 funcat

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

代码示例1
function name(){ 
  //return something here
}

let name = function(arg){ return arg + 2}
name(4) //this equals 6, here we are calling our name function

//es6 style 

let name = (arg) => {return arg+ 2}
name(4) //equals 6