You are viewing a single comment's thread. Return to all comments →
Nice. This line looks a little weird to me:
Math.sqrt(n) % 1 == 0
Any integer % 1 is always 0. So it seems that line is just checking if the square root of n is an integer or not.
HackerRank solutions.
Seems like cookies are disabled on this browser, please enable them to open this website
Day 19: Interfaces
You are viewing a single comment's thread. Return to all comments →
Nice. This line looks a little weird to me:
Any integer % 1 is always 0. So it seems that line is just checking if the square root of n is an integer or not.
HackerRank solutions.