June 2018
Intermediate to advanced
348 pages
8h 19m
English
In most of the scripting languages, the type is associated with the value, not with the variable itself. What it means? JavaScript and other languages such as Python, called weakly typed, does not need to specify which kind of data we will use to store in the variable. JavaScript has many ways to ensure the correct type of an object, including duck typing.
Let’s look at an example:
1. var age = 26;2. age = "twenty-six";3. age = false;
In the preceding code, the defined variables accept any data type, because data types will be evaluated ...
Read now
Unlock full access