I apologise if my title is poor, I'm struggling to visualise what to do here.
I have been self teaching myself JavaScript.
Currently I am trying to make a tic-tac-toe.
I am only using vanilla javascript and lodash.
I have the board currently stored as an array using lodash.chunk to split it into 3 rows:
eg.
array = [
[x,x,x],
[x,o,x],
[o,o,x],
]
I already have it finding a winner in the same row, but I am trying to determine if someone wins diagonally, up/down etc.
I'm just having a lot of trouble understanding what I need to do next or how to visualise it.
Hoping someone can show me how to do this using best practices?
Thank you very much