I am just starting JS, and understand the concept of finding a factor. However, this snippet of code is what I have so far. I have the str variable that outputs nothing but the
function calculate(num){ var str = "0" // initializes a place holder for var str for(i=2;i