3 ms·
Great link, that really clarified things for me (I think). The OP article uses this sample as something you can do with fat arrows. "Because the containing sc
by tieTYT 13y ago
Great link, that really clarified things for me (I think). The OP article uses this sample as something you can do with fat arrows. "Because the containing scope closes over the fat arrow function, you can do things like,"
let fib = (n) => {
if (n <= 1) return 1;
return fib(n - 1) + fib(n - 2};
}
I don't understand what this is showing. Wouldn't this code work the same way without fat arrows because there's no `this` being used anywhere?