1.1 What is JavaScript ?

Welcome to this JavaScript course for beginners. The goal of this first chapter is to answer four simple questions: what is JavaScript, what can we do with it, where does the JavaScript code run, and what is the difference between JavaScript and ECMAScript?

JavaScript is a development language, more precisely an object-oriented scripting language. Historically it was used to add small animations and effects to web pages, but today it is one of the most popular and fastest growing programming languages in the world. Companies like Netflix, Walmart and PayPal build entire applications around it.

What can we do with JavaScript?

  • Build full web applications and progressive web apps.
  • Build mobile applications with frameworks like React Native or Ionic.
  • Create real-time tools such as chatbots, video streaming services or command-line utilities, and even games.

JavaScript was originally designed to run only in browsers. Each browser ships its own JavaScript engine: Chrome uses V8, Firefox uses SpiderMonkey. In 2009 an engineer named Ryan Dahl took the open-source V8 engine and embedded it into a C++ program now known as Node.js, which makes it possible to run JavaScript outside the browser and to build backend applications.

Finally, ECMAScript is just a specification, while JavaScript is the programming language that implements it. The first version of ECMAScript was released in 1997, and since 2015 a new yearly edition has been published, starting with what we call ES2015 (also known as ES6).

To wrap up the theory, open any browser, right-click and choose Inspect, then go to the Console tab. Type console.log("Hello world"); to see the message, evaluate 2 + 2 to get 4, or trigger an alert("Hi") popup. The next chapter sets up the development environment so we can start writing real code.

Summary

JavaScript is an object-oriented scripting language used to add interactivity and animations to web pages. Originally designed for browsers, JavaScript has evolved to power entire applications on major platforms (Netflix, Amazon, Paypal) and can now be used for backend development, mobile apps, real-time services, CLI tools, and games. The language is powered by JavaScript engines (V8 in Chrome, SpiderMonkey in Firefox) and was further expanded through Node.js, which enabled server-side execution since 2009.

Key points

  • JavaScript is an object-oriented scripting language for creating interactive web content and is one of the most widely-used programming languages in the world
  • Beyond browsers, JavaScript powers full-stack applications including web apps, mobile apps, real-time services (chats, bots), video streaming, CLI tools, and games
  • JavaScript engines (V8, SpiderMonkey) run JavaScript code in browsers; Node.js extended this by embedding V8 to execute JavaScript on servers and outside browsers
  • ECMAScript is the official standard specification for JavaScript; ES6/ES2015 (launched 2015) introduced major language features, followed by annual updates
  • You can test JavaScript immediately in any browser's Developer Console using console.log(), mathematical expressions, and alert() functions

FAQ

What is the difference between JavaScript and ECMAScript?

ECMAScript is the official standardized specification for JavaScript, first released in 1997. JavaScript is the practical implementation of that specification. ES6 (ES2015) launched in 2015 and introduced major language improvements, after which new versions are released annually.

Can JavaScript only run in web browsers?

No. While JavaScript was originally designed for browsers, Node.js (created in 2009 by Ryan Dahl) integrated Google's V8 JavaScript engine into a C++ program, allowing JavaScript to run on servers and outside browsers. Today JavaScript powers backend applications, mobile apps, CLI tools, and more.

What are some real-world applications built with JavaScript?

Major companies like Netflix, Amazon, and PayPal build entire applications around JavaScript. It is used to create interactive web pages, real-time services (chats, video streaming), mobile applications, command-line tools, and even games.