← Back to challenges

Chess Board Squares

JavaScriptHardalgebraalgorithmslogic

Instructions

Create a function that takes a chess board square's coordinate and return its color.

Alternative Text

Examples

chessBoard("a1") ➞ "black"

chessBoard("e5") ➞ "black"

chessBoard("d1") ➞ "white"

Notes

N/A

javascript
Loading editor…
to run
Walks through the solution with reasoning and edge cases.
Next: Vowel Sandwich