https://leetcode.com/problems/determine-color-of-a-chessboard-square/



Runtime: 94 ms, faster than 44.44% of TypeScript online submissions for Determine Color of a Chessboard Square.

Memory Usage: 45.2 MB, less than 11.11% of TypeScript online submissions for Determine Color of a Chessboard Square.



```typescript
function squareIsWhite(coordinates: string): boolean {
    //8:09
    let letterList = "abcdefgh".split("")
    let numberList = "12345678".split("")
    
    let letter = coordinates.split("")[0]
    let number = coordinates.split("")[1]
    
    let letterIndex = letterList.indexOf(letter) + 1
    let numberIndex = numberList.indexOf(number) + 1
    
    console.log(letter, number, letterIndex, numberIndex)
    
    if (
        (((letterIndex*numberIndex) % 2) == 1)
        ||
        (letterIndex == numberIndex)
        ||
        ((letterIndex%2==0) && (numberIndex%2==0))
       ) {
        return false
    } else {
        return true
    }
    //8:25
};
```
