Finally if none of these return False, we are sure that a Queen at that row and col position is a valid state. So we will return true.

JAVASCRIPT
OUTPUT
Results will appear here.