Skip to content
Advertisement

How to add number to each item in list?

I want to add automatic number to each item in the list using for :

JavaScript

at the end that what i want to look like:

JavaScript

the code that i write:

JavaScript

Which outputs

JavaScript

Advertisement

Answer

You can use enumerate for this quite simply as –

JavaScript
JavaScript
User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement