My assignment is to make an ordered list in JavaScript using document.write(). I wrote the code to make it into a list, but it does not make it ordered. I would like to have the items numbered rather than bullet pointed. Below is the code that I have written so far:
<script>
// Create ordered list
document.write("<li> Reduce spending on non-necessities.</li>");
document.write("<li> Use extra money to pay off debt. Starting with highest-interest credit cards.</li>");
document.write("<li> Continue paying off debts until you are debt free.</li>");
document.write("<li> Put a fixed percent of your pay aside every payday.</li>");
</script>
document.write("<ol>")at the start and close the tag the same way at the enddocument.write()is a sign of poor programming.