April 2018
Intermediate to advanced
298 pages
6h 34m
English
One of the nice features of a dynamically-typed language like JavaScript is that you can write code without having to think about types. Types are good and they do solve a lot of problems—the point I'm trying to make, believe it or not—but sometimes you need to be able to just write code without having to formally validate for correctness. In other words, sometimes guesswork is exactly what you need.
If I'm writing a function that I know takes an object as an argument, I can just assume that any object that's passed to my function will have the expected properties. This allows me to implement what I need to, without having to make sure that the correct types are passed as arguments. This will only work for ...