Skip to content

Commit

Permalink
after week 10
Browse files Browse the repository at this point in the history
  • Loading branch information
Dierk Koenig committed May 12, 2021
1 parent 3c88477 commit e59641d
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
9 changes: 9 additions & 0 deletions week10/async.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,15 @@
// Example

// fetch('https://jsonplaceholder.typicode.com/todos/1')
// .then(resp => resp.json())
// .then( todo => out.textContent = todo.title);

const doit = async () => {
const response = await fetch('https://jsonplaceholder.typicode.com/todos/1');
const todo = await response.json();
out.textContent = "first title is: " + todo.title;
}
doit();

</script>

Expand Down
2 changes: 1 addition & 1 deletion week9/Milestone_4/todo/View.html
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,4 @@ <h1>Todo List</h1>

</body>

</html>
</html>

0 comments on commit e59641d

Please sign in to comment.