JavaScript program to find the factors of a number:

Created with Sketch.