JS Reference

JS Reference

A JavaScript reference guide.

Star Follow

What is JavaScript?

JavaScript is the programming language used to make websites dynamic and interactive. It's a client-side programming language, which means the code gets executed in the user's web browser. It can also be used as a server-side language, making it extremely versatile. JavaScript is used primarily for front-end web development, and works closely with HTML and CSS.

Note: Java is not JavaScript. It's a different language with a confusingly similar name.


You already have the prerequisites to start writing and using JavaScript. All you need is a web browser to view the code, and a text editor to write it. The browser you're currently using is perfect (Chrome, Firefox, Safari, Edge, etc). Your computer comes preinstalled with Notepad (Windows) or TextEdit (Mac), but I would recommend installing Atom or Brackets, which are free programs specifically designed for coding.

Basic Terminology

A programmer writes programs, just as an author writes a book.

A program is just a set of instructions that a computer can read and use to perform a task. Each individual instruction is a line of code known as a statement, which is similar to a sentence in a book. While a sentence in English ends with a period, a JavaScript statement usually ends in a semi-colon. Syntax refers to the symbols and rules that define the structure of the language, similar to grammar and punctuation, and the semi-colon that ends a JavaScript statement is part of the syntax.