Im teaching myself jS and hoping someone could explain why currentPlayer is undefined.
Is it something that jS doesn't support or am I doing it wrong?
the array gets filled in a function later in the code and turnCount increments
let playersArr = [];
let turnCount = 0;
const currentPlayer = playersArr[turnCount];
any insights would be appreciated.