fix: use correct variables for challenge (#34935)
Deleted the sentence which refers a.start.x as an object, as it is not an objectpull/33085/head^2
parent
9d2719e2e4
commit
5f6595b7dc
|
@ -9,7 +9,7 @@ challengeType: 1
|
|||
We can similarly destructure <em>nested</em> objects into variables.
|
||||
Consider the following code:
|
||||
<blockquote>const a = {<br> start: { x: 5, y: 6},<br> end: { x: 6, y: -9 }<br>};<br>const { start : { x: startX, y: startY }} = a;<br>console.log(startX, startY); // 5, 6</blockquote>
|
||||
In the example above, the variable <code>start</code> is assigned the value of <code>a.start</code>, which is also an object.
|
||||
In the example above, the variable <code>startX</code> is assigned the value of <code>a.start.x</code>.
|
||||
</section>
|
||||
|
||||
## Instructions
|
||||
|
|
Loading…
Reference in New Issue