Quick one for beginners: you never need to test past the square root. Each divisor found below sqrt(n) gives you its pair for free, which is why a simple loop up to Math.sqrt(n) is enough. I built a small reference page around this idea here: factor calculator. Handy when you want to sanity-check homework without doing the loop by hand every time.
For further actions, you may consider blocking this person and/or reporting abuse
Top comments (0)