Determine Color of a Chessboard Square
You are given coordinates, a string representing the coordinates of a chessboard square. The coordinates are represented as a letter followed by a digit.
The chessboard is composed of a grid of size 8x8, where each square is either black or white. The letters 'a' through 'h' represent the columns, and the digits '1' through '8' represent the rows, where '1' is the bottommost row and '8' is the topmost row.
Determine the color of the square with the given coordinates.
The color of a square is determined by the sum of its row and column indices. If the sum is even, the square is white. If the sum is odd, the square is black.
I want to discuss a solution
Help me solve this
Give more examples
What's wrong with my code?
How to use 'for loop' in javascript?