Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- * A nested for loop to print all seat combinations in a theater.
- * The first row-seat combination should be 0-0
- * The last row-seat combination will be 25-99
- */
- // loop through the rows
- for (var r=0; r<26; r++){
- // loop through the seats
- for (var s=0; s<100; s++){
- // print every row-seat combination
- console.log(r + "-" + s);
- }
- }
Add Comment
Please, Sign In to add comment