1 What is JavaScript?

What is JavaScript?

JavaScript is recognized as a full programming language which can interact with nearly all aspects of the browser window and its contents., capable of complex calculations and interactions, including closures, anonymous (lambda) functions, and even metaprogramming.

parts of javascript dom bom ecma

Parts of JavaScript

ECMA Script

The core language is what is known as ECMA Script or European Computer Manufacturers Association Script. Pretty Nasty name eh? Well, don’t fret, this is why we call it ECMA Script. At a very basic level, ECMA Script describes the following parts of the language:

  • Syntax
  • Types
  • Statements
  • Keywords
  • Reserved words
  • Operators
  • Objects

If all that sounds too complicated, don’t worry! We’ll take one step at a time to master JavaScript from zero.

DOM (Document Object Model)

The DOM represents an entire page as a hierarchy of nodes. Each part of an HTML or XML page is a type of a node containing different kinds of data. Take a look at this HTML code and see how DOM represents it


 DOM tree structure of above code

javascript dom tree structure

By creating a tree to represent a document, the DOM allows developers an unprecedented level of control over its content and structure. Nodes can be removed, added, replaced, and modifi ed easily by using the DOM API. The whole idea is “Modify The Page Without Reloading”

BOM (Browser Object Model)

BOM allowed access and manipulation of the browser window.

  • The capability to pop up new browser windows
  • The capability to move, resize, and close browser windows
  • The navigator object, which provides detailed information about the browserThe location object, which gives detailed information about the page loaded in the browser
  • The screen object, which gives detailed information about the user’s screen resolution
  • Support for cookies
  • Custom objects such as XMLHttpRequest and Internet Explorer’s ActiveXObject

Again if most of these features or terms seem vague, don’t sweat. We’ll take 1 step at a time to master all this.


So, where are we headed with all this?

JavaScript is a scripting language designed to interact with web pages and is made up of the following three distinct parts:

  1. ECMAScript, which is defi ned in ECMA-262 and provides the core functionality
  2. The Document Object Model (DOM), which provides methods and interfaces for working with the content of a web page
  3. The Browser Object Model (BOM), which provides methods and interfaces for interacting with the browser

Stay tuned with slidenerd as we dig deeper into JavaScript in the upcoming posts and don’t worry if some of these terms seem unfamiliar, you’ll master them over time.