Snake Logic movement error

So everytime I press right the values of NextX and NextY starts becoming undefined , and I can’t figure Out Why
code :- https://ide.codingblocks.com/s/228928

Hey @ranaabhinav50
Hope you’re enjoying the course
I request you to kindly upload your code on Github and then send the link
I can’t run your code just with this JS
Thanks

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.

Js code link : https://github.com/everythingProgrammer/JS/blob/master/Snake/gamelogic.js
Directory link: https://github.com/everythingProgrammer/JS/tree/master/Snake
Please check this code

@ranaabhinav50
Line 69
snake.direction = “right”;
Make it “Right” instead of “right”

1 Like