RosettaCodeData/Task/Function-definition/JavaScript/function-definition-6.js

9 lines
237 B
JavaScript
Raw Normal View History

2023-07-01 11:58:00 -04:00
var multiply = (a, b) => a * b;
var multiply = (a, b) => { return a * b };
2024-10-16 18:07:41 -07:00
// Or, `var` being long deprecated, and currying convenient,
// (particularly in use with the higher-order Array methods)
const multiply = a =>
b => a * b;