scrimba
Frontend Career Path
Working with APIs
Intro to APIs
BoredBot - Extra Styling
Go Pro!Bootcamp

Bootcamp

Study group

Collaborate with peers in your dedicated #study-group channel.

Code reviews

Submit projects for review using the /review command in your #code-reviews channel

AboutCommentsNotes
BoredBot - Extra Styling
Expand for more info
index.js
run
preview
console
/**
Challenge:

- Make the styling more exciting once an activity idea comes
back from the Bored API
- Resources: DOM element "classList" property, uigradients.com,
Google Fonts, color.adobe.com
- Some ideas:
- Change the title from "BoredBot" to something more exciting!
- Change the background to something less drab.
- Bonus: Animate something on the screen to move around and add more
excitement to the page
*/

document.getElementById("get-activity").addEventListener("click", function() {
fetch("https://apis.scrimba.com/bored/api/activity")
.then(response => response.json())
.then(data => {
document.getElementById("activity").textContent = data.activity
})
})
Console
/index.html
-4:18