+ 2
Can dropdown list be made in js using a for loop or without using a for loop?
Like List item 1: 00 List item 2: 01
5 Antworten
+ 3
Sorry I missed your reply.
You can find how to make a dropdown list here:
https://www.w3schools.com/howto/howto_js_dropdown.asp/
In this simple code I generated the list(not dropdown) contents using a while loop:
https://code.sololearn.com/W2oao4yPQ5GD/?ref=app
Merging both sources you should be able to make a dropdown in Javascript by your own.
+ 2
It can be made using:
-for loop
-while loop
-recursion
-[ ].map method
-generators
-for of loop
-and more if you are creative enough.
+ 2
Can you provide an example
+ 2
Good work👍
+ 1
https://code.sololearn.com/Woj1KoC1vqhQ/?ref=app
Thanks it works