summary refs log tree commit diff stats
path: root/javascript/raindrops
Commit message (Collapse)AuthorAgeFilesLines
* JS: Raindrops: Switch to using a mapAndinus2021-09-051-9/+9
| | | | | | | | | | | | | | | | I switched to single object literals initially: const factorToSound = { 3: "Pling", 5: "Plang", 7: "Plong" }; and used `for .. if` to iterate over them, that may cause some issues: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for...of#difference_between_for...of_and_for...in I decided to switch to using Maps and iterate over them with `for .. of` instead.
* JS: Raindrops: Move rules to a constAndinus2021-09-051-8/+10
|
* JS: Raindrops: Remove repeated math logicAndinus2021-09-041-5/+11
| | | | | | - Removes repeated math logic. - Compares against "" instead of using .length. - Uses "number" instead of "num".
* JS: Raindrops: Add solutionAndinus2021-09-039-0/+259