JavaScript is used in all kinds of places. The most popular way we get introduced to JS is through web browser.

When we view HTML in the browser, the browser turns the HTML into the DOM: Document Object Model. We can see the DOM in the Elements tab in Dev Tools.

We can interact with the DOM like listening for clicks, add/remove elements from the DOM, fetch new data, play music and video etc. using JavaScript.

The window:

The document:

The navigator: