A spelling mistake in the word "preferrably"❗️
There must be one character "r".
This commit is contained in:
parent
8aecaa8598
commit
1d45b45c07
1 changed files with 1 additions and 1 deletions
|
@ -255,7 +255,7 @@ The syntax is:
|
|||
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.
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue