Systems or components that fail-fast, stop running when they fail. This may not sound like a desirable design trait, but consider the alternative: a system or a component that fails, but then continues to run anyway. These components could be running in an erroneous state, whereas, that's not possible if the system or component halts.
There are times where we'll want to recover a failed component, and we'll get into that topic later on in the chapter. In this section, we'll go over some of the criteria used in determining whether a JavaScript component should fail fast, and what the consequences are for the user. Sometimes, even our fail-fast mechanisms fail us, which we also need to consider.