A spelling mistake in the word "preferrably"

There must be one character "r".
This commit is contained in:
Prokhor 2018-10-28 16:13:33 +03:00 committed by GitHub
parent 8aecaa8598
commit 1d45b45c07
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -255,7 +255,7 @@ The syntax is:
throw <error object> throw <error object>
``` ```
Technically, we can use anything as an error object. That may be even a primitive, like a number or a string, but it's better to use objects, preferrably with `name` and `message` properties (to stay somewhat compatible with built-in errors). Technically, we can use anything as an error object. That may be even a primitive, like a number or a string, but it's better to use objects, preferably with `name` and `message` properties (to stay somewhat compatible with built-in errors).
JavaScript has many built-in constructors for standard errors: `Error`, `SyntaxError`, `ReferenceError`, `TypeError` and others. We can use them to create error objects as well. JavaScript has many built-in constructors for standard errors: `Error`, `SyntaxError`, `ReferenceError`, `TypeError` and others. We can use them to create error objects as well.