JS basics
-
Math order: PEMDAS (Parenthesis - Exponential - Multiplication - Division - Addiction - Subtraction)
-
// → To create a comment in the JS code
-
% → modul (mod)
-
** → exponential
-
NaN → not a number (something impossible or irrelevant as a mathematical number) that the code considers a number.
-
variable name rules:
- no spaces
- digits cannot be the beginning of the name
- in case of multiple words name use cammel case (iAmSam), lower case only for the firs word
- define GOOD memorable names
-
String: primitive type that contains textual
-
&& → and, it unifies two concepts and both have to be true
-
|| → or, at least one of the conditions is true. The answer is false, only if every condition is false.
-
&& has preference over ||. To make it clearer, it’s possible to use ().
-
! → not. It reverse the value of a concept. If it’s false it becomes true. And viceversa.