Home javascript JS Kata #1

JS Kata #1

by Raffaele Pizzari
JS-Kata 1

Introduction

It is Monday and time to try out JS Kata #1.
I am planning on starting with some beginners exercises to warm us up, and gradually move on to more difficult ones.

I will be getting the exercises mainly from codewars.com, but possibly other resources which I will always state.

I will post the answers on Thursdays, at which time we can discuss and explain them, as there will surely be different ways that people got to the solution.

This is a new activity and I would really appreciate any comments, opinions and suggestions to make this a better experience for everyone.

Please know that I will surely consider all feedback that I get, but cannot implement everything, so please be kind 🙂

– Emilija

Kata

[JS Kata #1, fundamental JS, obtained from codewars.com]

Integers: Recreation One

Divisors of 42 are : 1, 2, 3, 6, 7, 14, 21, 42.
These divisors squared are: 1, 4, 9, 36, 49, 196, 441, 1764.
The sum of the squared divisors is 2500 which is 50 \* 50, a square!

Given two integers m, n (1 <= m <= n) we want to find all integers between m and n whose sum of squared divisors is itself a square. 42 is such a number.

Happy coding 🙂

Code Sandbox: https://codesandbox.io/s/winter-field-r52tx 

You may also like

Leave a Comment