Learn Intermediate OOP by Building a Platformer Game - Step 95

Tell us what’s happening:

need help in understanding whats wrong with my code

Your code so far

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

/* file: styles.css */

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

class CheckPoint {
  constructor(x, y, z) {
       this.position = {
            x: x,
            y: y

// User Editable Region

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/ Safari/537.36 OPR/

Challenge Information:

Learn Intermediate OOP by Building a Platformer Game - Step 95

Please Tell us what’s happening in your own words.

Learning to describe problems is hard, but it is an important part of learning how to code.

Also, the more you say, the more we can help!

in this question i was asked :
Inside the constructor, create an object with x and y parameters and assign it to the position.

Remember to use the this keyword to access the properties.

i think i am doing it correctly but it doesn’t seem to be working, i have tried searching and revising on how to do it but i haven’t had any luck so would be appreciated if i was nudged to the right direction, or point out where am i going wrong.

P.S i have also refreshed the lesson and entered the code, which stills runs into the same mistake of :

" The this.position property should be an object with the x and y coordinates."

Hi @singhswaraajpal

Try removing the keys.

Happy coding