Chapter 9. JavaScript Expressions, Operators, Statements, and Arrays

JavaScript is the most commonly used web programming language and is very popular among developers around the world. This chapter will cover most of the expressions, operators, statements, and arrays used in this language.

Expressions

A valid unit of code required to resolve a value is known as an expression. It is a set of literals, operators, variables, and expressions required to evaluate a value. This value can be a string or any logical value. An expression results in a value that can be written wherever a value is expected. There are two types of expressions:

  • An expression that assigns a value to a variable
  • An expression that has a value

Consider the following example:

var A ...

Get Web Developer's Reference Guide now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.