2 Using modern JavaScript tools
This chapter covers
- Three tools that have taken the JavaScript world by storm
- Why most JavaScript code is now written in TypeScript
- How productive teams resolve arguments about code style
Back in the early days of JavaScript, there was a common refrain among engineers: “It’s not a real language.” The idea was that JavaScript was a toy language, decent enough for writing simple scripts but ill-suited to “serious” programming.
That attitude has largely disappeared. JavaScript is one of the most popular languages in the world, and there’s no question that it can be used to build robust applications. What changed?
The language itself has evolved, certainly, with a steady stream of ECMAScript spec iterations adding new features. But the more significant change is how JavaScript is written. When engineers said it wasn’t a real language, what they meant was that it lacked the guardrails that languages like Java and C# have. If you write code in those languages that references a variable that hasn’t been defined, or that calls a function with the wrong number of arguments, or that tries to perform arithmetic on a string, you’ll get an error at compile time—or, better yet, a helpful warning in your IDE. If you write code in JavaScript with those mistakes, you won’t know about them until your code runs (if then!).