JavaScript for impatient programmers (ES2022 edition)
Please support this book: buy it or donate
(Ad, please don’t block.)

5 FAQ: JavaScript

5.1 What are good references for JavaScript?

Please consult §6.3 “JavaScript references”.

5.2 How do I find out what JavaScript features are supported where?

This book usually mentions if a feature is part of ECMAScript 5 (as required by older browsers) or a newer version. For more detailed information (including pre-ES5 versions), there are several good compatibility tables available online:

5.3 Where can I look up what features are planned for JavaScript?

Please consult the following sources:

5.4 Why does JavaScript fail silently so often?

JavaScript often fails silently. Let’s look at two examples.

First example: If the operands of an operator don’t have the appropriate types, they are converted as necessary.

> '3' * '5'

Second example: If an arithmetic computation fails, you get an error value, not an exception.

> 1 / 0

The reason for the silent failures is historical: JavaScript did not have exceptions until ECMAScript 3. Since then, its designers have tried to avoid silent failures.

5.5 Why can’t we clean up JavaScript, by removing quirks and outdated features?

This question is answered in §3.7 “Evolving JavaScript: Don’t break the web”.

5.6 How can I quickly try out a piece of JavaScript code?

§8.1 “Trying out JavaScript code” explains how to do that.