- It is light.
- Multiplatform, since it can be used on Windows, Linux or Mac or in the browser of your choice.
- It is Imperative and structured; by means of a set of instructions, it tells the computer what task it must perform.
- Prototyping, because it uses prototypes instead of classes for the use of inheritance.
- Object and event-oriented.
- It is Interpreted, it is not compiled to run.
They are containers in which the values are stored. It is declared with the expression ‘var.’ Variables are assigned values and can be of various types:
- String: or text strings
- Number: or numbers
- Boolean: have values of true or false
- Array: stores multiple values in a single reference
- Object: a generic variable type that supports almost any value
Symbols that act on 2 values or variables to produce different results. Some of the simplest operators are:
- Sum or concatenation: add or join different strings +
- Subtraction, multiplication or division: add, subtract or multiply – * /
- Assignment operator: assign a value to a variable 0 =
- Identity / Equality: checks if two values are equal to each other and returns a Boolean value (true / false) ===
- Denial (not equal)
It is normally represented by the if… else structure and allows you to check whether an expression returns ‘true’ or not and, depending on the response, it throws one result or another. In these types of expressions, it is the criterion, which is always associated with 2 blocks.
If the if criterion returns the answer ‘true’ in response, the first block is thrown, if the answer is ‘false,’ the second block that goes after ‘else’ is thrown.… Read More →