Skip to content

Instantly share code, notes, and snippets.

@biglovisa
Created May 4, 2017 17:29
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 biglovisa/00c13627a4f1a19701cacdd934387d86 to your computer and use it in GitHub Desktop.
Save biglovisa/00c13627a4f1a19701cacdd934387d86 to your computer and use it in GitHub Desktop.
Logical operators: check-ins

Logical Operators

Logical operators

  • Write down two statements using the || operator and two using the && operator.
    • Verifying the return value of the statements in the Node console first, let the person next to you guess whether the four statements will evaluate to true or false.
  • What does "hello" || false evaluate to? Why?
  • What does "hello" && undefined evaluate to? Why?
  • What does "hello" && "it's me" evaluate to? Why?
  • What does "hello" || "it's me" evaluate to? Why?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment