Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added .DS_Store
Binary file not shown.
12 changes: 10 additions & 2 deletions bonus.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

/////////////////////////////////////////////////////
// Bonus: More Tasks With Conditionals and Iteration
/////////////////////////////////////////////////////
Expand Down Expand Up @@ -41,6 +40,15 @@ const ticketSections = [
{name: "Bob Dole", section: "center", type: "premium", seats: 3}
]

for (let i=0; ticketSections.length; i++) {
const dignitary = ticketSections[i]
if (dignitary.type === "premium") {
console.log(`Welcome, ${dignitary.name}! You may sit anywhere in the first 3 rows of the ${dignitary.section} section.`);
} else {
console.log(`Welcome, ${dignitary.name}! You and your party may sit anywhere except first 3 rows of the ${dignitary.section} section. Please be sure to leave no seats between you.`);
}
}

// 2. There is a concert at the LA County Fairgrounds by the Southland's
// hottest Talking Heads tribute band for zombie afficianados,
// "The Wailing Deads" (known as "The Walking Deads" until they received
Expand Down Expand Up @@ -79,4 +87,4 @@ const tickets = [
{amount: 80.00, discount: true},
{amount: 90.00},
{amount: 50.00, discount: true}
]
]
Loading