The VIP Bouncer

Easy+15 XP

Mission Briefing

The bouncer at the VIP lounge of the Grand Casino needs an automated scanner. Only high-rollers are allowed past the velvet rope.

The Concept: Conditional Logic

Programming is all about making decisions. The most common way to do this is with the if/else statement. It works exactly like a fork in the road: if a condition is true, go one way; if it's false, go the other.

The Objective

Your function receives a parameter amount representing a customer's spending.

  1. Use an if/else block to check if the amount is 500 or more.
  2. If it is, return: "Eligible for VIP Discount"
  3. If it is strictly less than 500, return: "Standard Pricing"

01EXAMPLE 1

Inputamount = 600
Output"Eligible for VIP Discount"

02EXAMPLE 2

Inputamount = 250
Output"Standard Pricing"

Constraints

  • Return one of the two specified success/failure strings.
FundamentalsControl FlowLogic
JavaScript
Loading...
3 Hidden

Input Arguments

amount600

Expected Output

Eligible for VIP Discount

Click RUN to test your solution