This is a JavaScript function to generate all possible multiplication factor when given an input integer.
How to use the JavaScript 'factors' function:
-
Place the index.html and the index.js into the same directory.
-
Double-click on the index.html to open the index.html in a browser.
-
Right-click on the webpage and select "Inspect Element".
-
You should be able to see the output of the 'factors' function in the "Console" tab.
-
You could use the 'factors' function by calling the function from the index.js
a) Open index.js in a text editor.
b) Call the 'factors' function by " factors(99) " given that 99 is the input integer.
c) Save the index.js file and re-open/refresh the index.html webpage.