Media Summary: this one uses a while loop, an if statement, and the Math.round() static method kata link: ... this one uses a for loop and the reduce() method kata link: ... updated version: First use map(), then use reduce()
Codewars Square N Number 8 Kyu Tdd In Javascript - Detailed Analysis & Overview
this one uses a while loop, an if statement, and the Math.round() static method kata link: ... this one uses a for loop and the reduce() method kata link: ... updated version: First use map(), then use reduce() updated version: this one uses Math.sqrt(), Math.round(), and Math.pow() standard if statement and for loop; i couldnt find a reliable one-liner kata link: ... reworked version: this one's got Array.from(), map(), and parseInt()