fix(curriculum): add backticks in role playing game project (#48886)

Closes https://github.com/freeCodeCamp/freeCodeCamp/issues/48870
This commit is contained in:
Mark Linn 2023-01-11 15:47:43 +01:00 committed by GitHub
parent 0126389f18
commit 593ca57c1e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -7,7 +7,7 @@ dashedName: step-62
# --description--
The `locations` array contains two locations: the town square and the store. Currently you are passing that entire array into the update functions. Pass in only the first element of the `locations` array by adding `[0]` at the end of the variable. For example: `myFunction(arg[0]);`.
The `locations` array contains two locations: the `town square` and the `store`. Currently you are passing that entire array into the `update` function. Pass in only the first element of the `locations` array by adding `[0]` at the end of the variable. For example: `myFunction(arg[0]);`.
This is called <dfn>bracket notation</dfn>. Values in an array are accessed by index. Indices are numerical values and start at 0 - this is called zero-based indexing. `arg[0]` would be the first element in the `arg` array.