1 — Infinite-Arrays
let sequence = [1,2,3];
console.log(sequence);// just go on forever.
First we made an array with three elements in it. Then we pushed the array to itself. Now you can forever access the array on its last element, it won’t give any errors; Try to run a for loop on the sequence array it may give you a little surprise. :);
2 — A little quine with array.reduce() method
const filtered = [2,4,10].reduce((a , b) => a + b,(a , b) => a + b + " ");console.log(filtered); // (a , b) => a + b + " "2410;
Instead of giving initial any initial value to the .reduce() method, we gave it an arrow function, and thus it prints out itself in the console, with the result. Well that’s all I have for you today, see you next time.