Question: In Javascript code create a FOR LOOP that outputs the numbers 1 3 5 7 9 with line breaks between each number. Display the output

In Javascript code create a FOR LOOP that outputs the numbers 1 3 5 7 9 with line breaks between each number. Display the output with a document.write statement. Also write a function called subtract that accepts two parameters, checks to see which value is larger, subtracts the smaller number from the larger number, and returns the difference. Use a prompt to ask for two numbers. Use the document.write statement to display the results.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!