What is meant by "using an API" to store/retrieve quotes for the "Random Quote Machine" challeng?

I read you can either use arrays or an API to store/retrieve quotes for this challenge. I understand how you’d use arrays to store/retrieve quotes, but not using an API to do it.

API is a program that takes requests, tells a system what needs to be done, then returns a response.
You can imagine them as waiter. You order a chicken. The waiter go to kitchen. They have meat, egg, chicken etc but they only bring you chicken because that’s what you ask

if you see a Youtube content appear in a website, they use Youtube API. You ask for a video through API and the server bring the video you asked

in this challenge, you can use API to retrieve quote and the author’s name. You can search for a website that provide API quote like this. You look at their rules and try to apply it as if you say “give me a quote and the author’s name”.

the rules say you can use array or API so this is optional. I’d recommend you to use API as early start because your next three challenge use API

3 Likes