11 ms·
That can easily be explained by the following example, which is much more sensible: var a_number = 10; a_number = { blah: 10 }; var a_plus_two = a_number + 4
by rilita 12y ago
That can easily be explained by the following example, which is much more sensible:
var a_number = 10;
a_number = { blah: 10 };
var a_plus_two = a_number + 4;
Better yet you can simply say "Javascript does not have strict typing" and point people at the wiki article on strict typing. This is clear and concise as an explanation.
Showing confusing examples and saying "oh look this is horrible types can change" does not make the point stronger.
The article uses a whole lot of words and examples to point out problems that professional JS developers are aware of and work hard to avoid.
It also implies that such languages without strict typing are "unreasonable". It's not unreasonable. It's that way on purpose.