Q:

Write a JavaScript program to create a function that accepts up to one argument, ignoring any additional arguments

0

Write a JavaScript program to create a function that accepts up to one argument, ignoring any additional arguments

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

const unary = fn => val => fn(val);
console.log(['6', '8', '10'].map(unary(parseInt)));

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

Similar questions


need a help?


find thousands of online teachers now