I appear to have followed the instructions from the step correctly but the second test isn’t passing. How is this code wrong?
Your code so far
<!-- file: index.html -->
/* file: script.js */
// User Editable Region
if (keys.rightKey.pressed && isCheckpointCollisionDetectionActive) {
platforms.forEach(i => {
i.position.x - 5
})
}
// User Editable Region
/* file: styles.css */
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.0.0 Safari/537.36
Challenge Information:
Learn Intermediate OOP by Building a Platformer Game - Step 79
this is not changing the value of i.position.x, so your function is doing nothing
the instructions say to use the subtraction assignment operator, which is different from the subtraction operator