level_2_auth.js

/* Welcome back, Anna. Complete the logic block below to execute Level 2. */

// PROMPT: Would you like to go on a second date?
function initiateDate(annaAnswer) {
if (annaAnswer === "
") {
return loadItinerary();
} else {
return "Throw Error";
}
}

Documentation: If / Else Statements

In programming, an if/else statement is how we tell a computer to make a decision.

  • If the condition is met (meaning you type yes in the box), the computer will execute the first block of code and reveal the date itinerary.
  • Else (meaning you type anything else), the computer executes the second block of code, which will stubbornly throw an error until it gets the answer it wants.
> Executing Level 2 Itinerary... [OK]

Theme: The Classic Dinner & A Movie

📅 Date:
Wednesday, Aug 12th
🍺 6:00 PM:
Drinks @ Dovetail Brewery
// A comfortable distance for another lovely summer night walk
🍔 7:30 PM:
Dinner @ Murphy's Irish Bistro
🍿 9:30 PM:
"Cookie Queens" @ The Music Box
// Can't wait.
// - Adam

// Final step: Confirm compilation with developer

Send Adam a "Yes"