Learn Intermediate OOP by Building a Platformer Game - Step 101

I keep failing this step, please help me!

Error message: “You should implicitly return a new CheckPoint instance with the checkpoint.x, checkpoint.y and checkpoint.z values passed in as arguments in that order.”

<!-- file: index.html -->

/* file: styles.css */

/* file: script.js */
// User Editable Region

const checkpoints = checkpointPositions.map((checkpoint) => checkpoint.x,
checkpoint.y, checkpoint.z);

// User Editable Region

User Agent is: Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Mobile Safari/537.36

Learn Intermediate OOP by Building a Platformer Game - Step 101

Hi there,

According to the instruction, the callback function should:

return the creation of a new CheckPoint instance with the checkpoint.x, checkpoint.y and checkpoint.z values passed in as arguments.

So, instead of returning:

checkpoint.x, checkpoint.y, checkpoint.z

we should return a new CheckPoint instance object, using 3 arguments: checkpoint.x, checkpoint.y and checkpoint.z


For example:

to create a new Person instance object with 2 arguments first_name and last_name:

new Person(fisrt_name, last_name)
1 Like

Thank you for your help❤️

1 Like