3X3 Magic Square

A magic square is an arrangement of the numbers from 1 to n^2 (n-squared) in an nxn matrix, with each number occurring exactly once, and such that the sum of the entries of any row, any column, or any main diagonal is the same. In other words; with a 3X3 magic square there are nine squares, using each number (1-9) only once, place in square and the total of each row, column and diagonal must be the same.

This was my first JavaScript project, back in 2002.

Refactored 01/07/2021.

Try it.

3 X 3 Magic Square
total total total total total