docs: change (+) operator to `Number` function to match code (#41570)

PR Close #41570
This commit is contained in:
aschaap 2021-04-11 13:29:15 -04:00 committed by Zach Arend
parent 5e8dcfd641
commit fe6002977e
1 changed files with 1 additions and 1 deletions

View File

@ -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.