Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

What does () = > mean 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();
 
PREVIOUS NEXT
Tagged: #What
ADD COMMENT
Topic
Name
2+9 =