So schreiben Sie einen Funktionen in JavaScript

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
Succatash