Stonino82 / TK-WD2020-PART2

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

TK-WD2020-PART2

Notes on the development of this assessment

  • Use vanilla JavaScript
  • Use the API option to return the data using a JSON object
  • Code it so every 5 seconds the columns get a new set of random numbers
  • Make sure the new set of numbers that appear every 5 seconds haven’t appeared before
  • There’s no need to make this section overly pretty, but make sure it’s responsive

This part was a bit tricky because the API is very slow, the response is very late at times, therefore, since there is a 5 seconds delay before a new request (setInterval), when the API sends a response, it ends up gathering all the requests in the queue.

To avoid this I have used an asynchronous function, and instead of asking the api for a random route, I previously chose a random number so that I can request a specific route.

    Random facts:
  1. Numbers
  2. Trivia
  3. Year

About


Languages

Language:HTML 51.6%Language:CSS 36.6%Language:JavaScript 11.9%