Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

Arrow functions in js

/**
I think that you might be looking for 
the js "arrow function"; I hope that 
this example below helps ;)
**/ 

// usual function
function fartOne(){
    console.log('Pooofff... pof.. ppf.. poof.. p');
}

// arrow function to do the same
const fartTwo = () => console.log('Baaaf... paf.. poof.. poffie.. plop');

// call the functions to test 'em out..
fartOne();
fartTwo();
Source by softhunt.net #
 
PREVIOUS NEXT
Tagged: #Arrow #functions #js
ADD COMMENT
Topic
Name
1+7 =