[JavaScript] Functions Accepting Callback functions
const oneWord = function (str) {
return str.replace(/ /g, '').toLowerCase();
};
const upperFirstWord = function (str) {
const [first, ...others] = str.split(' ');
return [first.toUpperCase(), ...others].join(' ');
};
// Higher-Order function
...
jaydenjpark.hashnode.dev1 min read