JavaScript Values

You can define two types of values in JavaScript syntax.

Fixed values: Also known as literals

Variable values: Also known as variables

JavaScript Literals: The rules for defining fixed values are as under:

Write the numbers with or without decimals. For example: 9.5 or 95

Write the strings in double or single quotes. For example: “Hello World”, ‘Hello World’

JavaScript Operators 

Arithmetic operators such as +, -, *, and / are used to perform computations.

JavaScript Expressions

 An expression is a group of variables, values, and operators that help you perform calculations.

JavaScript Identifiers

Identifiers are names that are used to name the variables, labels, functions, and labels.

The first character in JavaScript must always be a letter, dollar sign, or an underscore. You cannot set numbers as first characters. The remaining characters could be digits or letters.