Created
November 19, 2020 00:25
-
-
Save luis-fonseca/8153ae7cd14a32be9de85b6a39b33b23 to your computer and use it in GitHub Desktop.
Create an element ul, li with js
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var c = document.querySelector('.dots'); | |
| var ul = document.createElement('ul'); | |
| var li; | |
| for (i = 0; i < 4; i++) { | |
| li = document.createElement('li') | |
| li.innerHTML = i; | |
| ul.appendChild(li); | |
| } | |
| c.appendChild(ul); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment