Skip to content
This repository was archived by the owner on Jan 3, 2023. It is now read-only.
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Started week 3 homework / fetch has done
fetch completed
  • Loading branch information
murselaysan committed Jul 29, 2020
commit 951d78d76be8eca521999390019a78c1c34bf15b
4 changes: 3 additions & 1 deletion Week-3/.old/InClass/C-fetch/exercise.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,12 @@ Open index.html in your browser. Every time you refresh the page,
a different greeting should be displayed in the box.
*/

fetch('*** Write the API address here ***')
fetch('https://codeyourfuture.herokuapp.com/api/greetings')
.then(function(response) {
return response.text();
})
.then(function(greeting) {

document.querySelector('#greeting-text').innerHTML = greeting;
// Write the code to display the greeting text here
});