More Javascript
What is an API?
An API (Application Programming Interface) is a set of functions that allows applications to access data and interact with external software components, operating systems, or microservices.
GET – Gathers information (Pulling all Coupon Codes)
PUT – Updates pieces of data (Updating Product pricing)
POST – Creates (Creating a new Product Category)
DELETE – (Deleting a blog post)
How Javascript works event loop stack and queue
The Event Loop has one simple job — to monitor the Call Stack and the Callback Queue. If the Call Stack is empty, the Event Loop will take the first event from the queue and will push it to the Call Stack, which effectively runs it. Such an iteration is called a tick in the Event Loop.
What is DOM
The Document Object Model (DOM) is a programming interface for web documents. It represents the page so that programs can change the document structure, style, and content. The DOM represents the document
For example, the DOM specifies that the querySelectorAll method in this code snippet must return a list of all the
elements in the document:
const paragraphs = document.querySelectorAll("p");
// paragraphs[0] is the first
element
// paragraphs[1] is the second
element, etc.
alert(paragraphs[0].nodeName);
Top comments (0)