Most of these questions are taken from bigfrontend.dev. A great website for practicing JavaScript and preparing for frontend interviews.
- Implement curry()
function curry(fn) {
return function curryInner(...args) {
if (args.length >= fn.length) return fn(...args);
return (...args2) => curryInner(...args, ...args2);
};