The syntax of any computer language defines how code is written in that language. It is a simple set of rules that is to be followed while writing the code. The combination of these rules give a form to the language.
These are basics how to define any variable and assign value to them.
Single or multiple variables can be defined in one go. Line terminates with a semicolon ;.
Variable values either can be provided later or can be give while defining variable;
What does it mean to be case sensitive? Case sensitive means if a variable is defined by the name "Car" then it is different from "car" or "cAr" or "CAR" and so on. All the characters with their case should match to be the same variable or function.
But it is always recommended as to end the line with a semicolon because
- Putting a semicolon at the end of line makes it more readable.
let is used to define a variable,
function is used to define any function etc.