Funcs & objs #1
const memoize = fn => {
let cache = {};
return (...args) => {
let stringifiedArgs = JSON.stringify(args);
let result = cache[stringifiedArgs] = cache[stringifiedArgs] || fn(...args);
return result;
};
};
const getItemsMemoised = memoize((x, y) => x+y);
//const getItems = memoize((x) => x+2);
console.log(getItemsMemoised(2, 3));INFO