Skip to content

Instantly share code, notes, and snippets.

@desinas
Last active December 16, 2017 18:34
Show Gist options
  • Save desinas/57021ded7a8f308a6b5f14a6de9416c4 to your computer and use it in GitHub Desktop.
Save desinas/57021ded7a8f308a6b5f14a6de9416c4 to your computer and use it in GitHub Desktop.
Find my seat Quiz (4-8) of Udacity FEWD
/*
* Programming Quiz: Find my Seat (4-8)
*
* Write a nested for loop to print out all of the different seat combinations in the theater.
* The first row-seat combination should be 0-0
* The last row-seat combination will be 25-99
*
* Things to note:
* - the row and seat numbers start at 0, not 1
* - the highest seat number is 99, not 100
*/
// Write your code here
for (var row= 0; row < 26; row++) {
for (var seat= 0; seat < 100; seat++) {
console.log(row + "-" + seat);
}
}
@desinas
Copy link
Author

desinas commented Dec 16, 2017

What Went Well

  • Your code should use a nested for loop
  • Your code should produce the expected output

Feedback: Your answer passed all our tests! Awesome job!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment