In this lesson we learned how to use commentaries and variables.
Javascript works with dynamic typing in variables.
The variable identifiers must follow some rules:
- They must begin with a letter, $ or _;
- They can't begin with a number;
- It's possible to use letters and numbers;
- It's possible to use accents and symbols;
- They can't contain spaces;
- They can't be reserved words.
- number: stores the all types of numbers. Includes two special types: Infinity and NaN.
- string: stores a characters array.
- boolean: stores the logic data.
- null: indicates that the variable have a null value.
- undefined: indicates that the variable type is undefined.
- object: stores an object. The Array type is an object.
- function: indicates a function.
Typeof is a function that return the type of the variable passed as argument.