Description
An expression is a combination of values, variables, and operators, which computes (or evaluates) and returns a value.
- The values in an expression can be of various data types.
- An expression is evaluated based on the operators used.
For more details on operators, check JavaScript Operators.
The below expression contains two values.
5 * 10
The below expression contains a variable and value.
x * 10
The below expression contains two strings that are concatenated using the string concatenation operator.
"Jack" + " " + "Sparrow"
Overall
JavaScript Expressions are useful in computing statements and returning the results.