C3 AI interview question

How to build chess in JavaScript