jQuery Test for You!

This is a test for you (and help for me) should you choose to except it!
I’m hoping at least AutisticCuckoo and Raffles give it a shot :wink:

    var array2 = [
            new obj("denver", 3),
            new obj("paris", 2),
            new obj("paris", 2),
            new obj("london", 4),
            new obj("tokyo", 3),
            new obj("tokyo", 1),
            new obj("madrid", 2)

In the above array we have a group of 3 going to denver, a group of 2 going to paris, another group of 2 going to paris, a group of 4 going to london and so on.

This airplane has 4 people to a row.

In the case of denver we can say that 1 person made the reservation and needs 2 seats held, leaving one open on the denver row.

Using jQuery create a table where each location gets a single row.
A working example is found here.

Your table should look the same when done, but your code could be better, that’s what I’m hoping for.

Feel free to copy the page and start there.

Thanks and good luck.

This was a fun challenge. First thing I did was reorganize the input data, grouping it as “location” => [groups]; example: “tokyo” => [3, 1]

That made it easier to cycle through the data and the data would not have to be in a particular order.

Flight Info