// option 1 const newVariable = (input1,input2) => { return input1 * input2; } // option 2 const newVariable = input1=> input1 * 2; // example var number = [1,2,4,50,62,45] const newNumbers = number.map(input => input*2) console.log(newNumbers)
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter