DEV Community

Discussion on: A Most Magic TicTacToe solution with React and TS

Collapse
 
rpresb profile image
Rodrigo De Presbiteris

You are right, this object doesn't generate a pure array.

it has the toArray function, but it does the same you did there.

 toArray() {
        return [...this];
    }
Enter fullscreen mode Exit fullscreen mode

I should have checked this before commenting

Thread Thread
 
kirkcodes profile image
Kirk Shillingford

No worries. I didn't even check to see if it implemented toArray(). That's probably the clearer way to express that intent. I'll use that instead. Thanks!