Click here to Skip to main content
15,789,460 members

Comments by bhaskar977 (Top 10 by date)

bhaskar977 20-Jan-23 22:43pm View    
can you  suggest a micro level roadmap on what should I do now in order to learn programming?
bhaskar977 12-Jan-23 4:12am View    
I'm already doing it. It's causing straight motion.
bhaskar977 10-Jan-23 7:40am View    
it's not clear to me at all. could you clarify in detailed way?
bhaskar977 10-Jan-23 7:23am View    
pls read my comment to first solution.
bhaskar977 10-Jan-23 7:23am View    
I must tell why my confusion came here:
Earlier in the code, we've done this:


```
//head of snake
let snakeArr = [
{
x: 13,
y: 15
}
]
```
Here x,y means the grid row 13, grid column 15. That is why I'm confused. We're using same variable names in 2 places with different meanings. In this question, we're using x,y for direction(up,down etc).
How are we able to do this?