- A fragment of code that produces a value is called an expression.
- Every value that is written literally is called an Expression. For example:
22
"Saturday"
- An expression between parentheses is also an expression.
The simplest kind of statements is an expression with a semicolon after it.
1;
true;
To catch and hold values, JavaScript provides a thing called a binding or variable
let caught = 5 * 5;
console.log(caught);
// -> 10
The = operator can be used anytime to change values from the bindings. Imagine Bindings or Variables is a tentacle not Boxes. They do not contained values but they grasp them. Example:
let sayudhaDebt = 20;
sayudhaDebt = sayudhaDebt - 5;
console.log(sayudhaDebt);
// -> 15;
if a variable or binding has no value, you'll get the value undefined