Codewars 8 Kyu Grasshopper Summation Javascript - Detailed Analysis
reworked version: using the Array() constructor, fill(), and reduce()instead of n*(n+1)/2. we use the reduce() method in this one reduce() info: ... this one uses the String() constructor, spread syntax (...), and more kata link: ... this one uses the this keyword kata link: using Object.assign() and Array.from() to complete some rooms. a nice one liner featuring an object and Math.floor()
standard if statement and for loop; i couldnt find a reliable one-liner kata link: ... this how you find out what the whole array equals kata link: another example of the ternary operator in action. here we use reduce() and the unary plus operator. this one uses aa for loop and template literals kata link: a refresher on the remainder operator (modulus)
an example of using the sort(), slice(), and reduce() methods sort() info: ...
Photo Gallery



















