Skip to content

Instantly share code, notes, and snippets.

@McLarenCollege
Last active November 22, 2022 19:54
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/c41ccac9be25923b7ad961d5043fe8af to your computer and use it in GitHub Desktop.
Save McLarenCollege/c41ccac9be25923b7ad961d5043fe8af to your computer and use it in GitHub Desktop.
Exercise Name : Goa Problem Part2

Change the third line such that the user can still vote (variable canVote is true) even if the user intializes the variable residence incorrectly as Goo.

CODE TEMPLATE


let age = 22;
let residence = "Goo"; // initialized incorrectly (spelling mistake)
let canVote = age >= 18 && residence === "Goa";// change this line
console.log(canVote); // should print true

@nkwoguctl
Copy link

let age = 22;
let residence = "Goo"; // initialized incorrectly (spelling mistake)
let canVote = age >= 18 || residence === "Goa";// change this line
console.log(canVote); // should print true

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