Created
January 24, 2017 00:33
-
-
Save InTheCloudDan/25facba78a26a34d45fa97b48947ccac to your computer and use it in GitHub Desktop.
This file contains 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
let state = { | |
todos: [ | |
{ title: 'First todo', complete: false }, | |
{ title: 'Second todo', complete: false }, | |
{ title: 'Third todo', complete: false }, | |
], | |
} | |
var ul = document.createElement("ul") | |
document.body.appendChild(ul) | |
state.todos.map(todo => { | |
let newItem = document.createElement("li") | |
newItem.textContent = todo.title | |
return ul.appendChild(newItem) | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment