Updated the code to utilize `Array.from()` to check for factors, this can be shortened even further (follow-up commits)