docs: change (+) operator to `Number` function to match code (#41570)
PR Close #41570
This commit is contained in:
parent
5e8dcfd641
commit
fe6002977e
|
@ -406,7 +406,7 @@ The `paramMap` is a dictionary of route parameter values extracted from the URL.
|
|||
The `"id"` key returns the `id` of the hero to fetch.
|
||||
|
||||
Route parameters are always strings.
|
||||
The JavaScript (+) operator converts the string to a number,
|
||||
The JavaScript `Number` function converts the string to a number,
|
||||
which is what a hero `id` should be.
|
||||
|
||||
The browser refreshes and the application crashes with a compiler error.
|
||||
|
|
Loading…
Reference in New Issue