Memoization in JS
Memoization - Memoization is an optimization technique that can be used to reduce time-consuming calculations by saving previous input in the cache and returning the result from it.
example
let sum = 0;
const calc = (n) => {
for (let i = 0; i <= n;...
yashpurkar.hashnode.dev1 min read