Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

how to write a funcat 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
 
PREVIOUS NEXT
Tagged: #write #funcat #javascript
ADD COMMENT
Topic
Name
2+2 =