What's the difference between an Interface and an API?
I used to think JavaScript doesn’t have Interfaces because it doesn’t have the Interface keyword, unlike Java.
But JavaScript DOES have interfaces. I found out about this when I tried Googling for the location API, which turned out to the location Interface 🤦♂️.
IMG: Location.png
I was confused. What the hell is the difference between an interface and an API? So I sat down and figured it out (as usual). I want to share my newfound understanding with you in this article.
Here’s the article again. Enjoy!
Quick Summary:
- Interfaces are the wrapper object you’re provided with.
- Application Programming Interfaces is a set of rules you need to follow to use the thing you want to use.
Stay awesome,
Zell