Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var listElement = document.querySelector('#app ul');
- var inputElement = document.querySelector('#app input');
- var buttonElement = document.querySelector('#app button');
- todos = [
- 'asdasd',
- 'dasdaaa',
- 'daaaaaa'
- ];
- function renderTodos() {
- for (todo of todos) {
- var todoElement = document.createElement('li');
- var todoText = document.createTextNode(todo);
- todoElement.appendChild(todoText);
- listElement.appendChild(todoElement);
- }
- }
- renderTodos();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement