Arrow Functions

Run Settings
LanguageJavaScript
Language Version
Run Command
//simple drop function keyword const hello=()=>{const es6='Hello its me '; return `${es6} Sanjiv Rai`; } console.log(hello()); //the second param specifies the index of the array const power=[1,2,3,4,5].map((number,index)=> {return Math.pow(number,index); }); console.log(power); const add=(n1,n2)=> {return n1+n2;}; console.log(add(23,32)); const milestokm=(miles)=> {return miles*1.60934;}; console.log(milestokm(1));
Editor Settings
Theme
Key bindings
Full width
Lines