They do the same thing for programming that ready-made furniture kits do for home building - it is much easier to take ready-cut panels and screw them together to make a bookshelf than it is to work out the design yourself, go and find the correct wood, cut all the panels to the right size and shape, find the correct-sized screws, and then put them together to make a bookshelf.īrowser APIs are built into your web browser, and are able to expose data from the surrounding computer environment, or do useful complex things.
ASYNC JAVASCRIPT AND YOU DONT KNOW JS ASYNC & PERFORMANCE CODE
So-called Application Programming Interfaces ( APIs) provide you with extra superpowers to use in your JavaScript code.ĪPIs are ready-made sets of code building blocks that allow a developer to implement programs that would otherwise be hard or impossible to implement. What is even more exciting however is the functionality built on top of the client-side JavaScript language. We used a click event in our example above to detect when the button is clicked and then run the code that updates the text label.
Let's take a simple text label as an example. The three layers build on top of one another nicely. (Okay, not everything, but it is amazing what you can achieve with a few lines of JavaScript code.)