I'm new so I'm probably wrong but it'll give an error. Counter was never initilized. But assuming it was and set to 0 I believe what this does is add rows of 8 numbers to the grid list. I've never used console.table before but it looks like it'll take a list and display it at a table.
No idea how close I am, but this was fun to take a try as a beginner.