I’m making a text based solitaire and I’m new to JS I wrote some code that works fine but my programmer friend says that its a miracle the code works?

    //Table
    var tableau = [[], [], [], [], [], [], []];

    function debugTableau(){ //Function to print out the tableau array to the console
        for (var column in tableau){
            for (var card in column){
                printToTerminal(tableau[column[card]]);
            }
        }
    }

    //Project hosted[ here](https://solitaire.theohaines.xyz)

The code works perfectly fine but my programmer friend tells me its a miracle the code works, can anybody tell me why?