I need help with this java script coding .Arrays Create new Bluel project contai
ID: 3706956 • Letter: I
Question
I need help with this java script coding .Arrays
Create new Bluel project containing a class called TicTacToe. Using your knowledge of parallel arrays (from the practice problems of the alternate array assignment #1, make a fully functional Tic-Tac-Toe program. You can do this by making 3 arrays that each hold 3 characters. array1 [ ,'' array2[' ,, array3 [ As players make moves, store the moves into the game board. Eventually, you might reach a state that looks like: array1 l'X', 'O array2 l'O 'x 1 We can see now that X has won the game by making 3 in a row diagonally. How to get user input: This is a 2 player game where the users take turns. Ask player 1 where they want to play Player 1 will type a number from 1 to 9 indicating the desired move. (Look at the numbers on the number pad at the right side of the keyboard. 9 is in the top right position, etc.) Place an X in position that player 1 requested, then ask player 2 to make a play, etcExplanation / Answer
Using a javascript, the main function to check the arrays whether the user has won or not would be:
Tic-tac-toe.js
N.B:- The function depicts only the logic in the js file which is behind the decision making.