Skip to content

Commit

Permalink
fix(curriculum): update directions for step 66 of platformer game pro…
Browse files Browse the repository at this point in the history
…ject (#54125)

Co-authored-by: Joy Shaheb <khondokoralam@gmail.com>
Co-authored-by: Jessica Wilkins <67210629+jdwilkin4@users.noreply.github.com>
  • Loading branch information
3 people committed Mar 18, 2024
1 parent 5b2794b commit c1137b0
Showing 1 changed file with 21 additions and 2 deletions.
Expand Up @@ -7,7 +7,26 @@ dashedName: step-66

# --description--

Inside the constructor, add `this.position` and assign it an object with the `x` and `y` coordinates.
When working with objects where the property name and value are the same, you can use the shorthand property name syntax. This syntax allows you to omit the property value if it is the same as the property name.

```js
// using shorthand property name syntax
obj = {
a, b, c
}
```

The following code is the same as:

```js
obj = {
a: a,
b: b,
c: c
}
```

Inside the constructor, add `this.position` and assign it an object with the `x` and `y` coordinates. Make sure to use the shorthand property syntax .

# --hints--

Expand All @@ -17,7 +36,7 @@ You should have a `this.position` property.
assert.match(code, /this\.position\s*;?/);
```

The `this.position` property should be an object with the `x` and `y` coordinates.
The `this.position` property should be an object with the `x` and `y` coordinates. Make sure to use the shorthand property syntax.

```js
assert.match(code, /this\.position\s*=\s*{\s*x\s*,\s*y\s*,?\s*}\s*;?/);
Expand Down

0 comments on commit c1137b0

Please sign in to comment.