Skip to content

Instantly share code, notes, and snippets.

@McLarenCollege
Last active July 4, 2022 11:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save McLarenCollege/ee7ffeb7a949f01f2da8d13606e407f3 to your computer and use it in GitHub Desktop.
Save McLarenCollege/ee7ffeb7a949f01f2da8d13606e407f3 to your computer and use it in GitHub Desktop.
Exercise Name : Cinema Discount

A cinema always gives children (aged less than 12 years) a discount.
It also gives seniors (aged at least 65) a discount on Mondays and Tuesdays.
Given the day of week and patron's age, write a boolean expression to calculate if the patron is entitled to a discount.

CODE TEMPLATE


let age = 11;
let day = "Tuesday";
let isGivenDiscount = ;  //Write an expression given age and day to calculate if patron is given disount.
console.log(isGivenDiscount);

Note: Please make sure that the first character of the day is a capital letter eg. Monday, Tuesday etc.

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