I was trying to understand code of this Tic-Tac-Toe (30 lines of code) game and encountered with this strange for me notation of js.
t[id] ? ai() : move(id, 'ai');
!checkEnd() ? (role == 'player') ? ai() : null : reset()
I know that this is shortened version of if-statement, but don't know exactly how to convert it.
Thanks in advance.