DEV Community

Manav Misra
Manav Misra

Posted on

Answer: TIC TAC TOE javascript

This Answer Does not Use jQuery

Using an array similar to what's shown in the above πŸ‘†πŸΎanswer, we can just use a few different array methods:

const WINNING_INDICES = [
  [0, 1, 2]
  [0, 3, 6],
  [0, 4, 8],
  [1, 4, 7],
  [2, 5, 8],
  [2, 4, 6],
  [3, 4,
…

Top comments (0)

Billboard image

Create up to 10 Postgres Databases on Neon's free plan.

If you're starting a new project, Neon has got your databases covered. No credit cards. No trials. No getting in your way.

Try Neon for Free β†’

πŸ‘‹ Kindness is contagious

Please leave a ❀️ or a friendly comment on this post if you found it helpful!

Okay