Skip to content

Instantly share code, notes, and snippets.

@anharathoi
Last active May 30, 2019 00:58
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 anharathoi/bbea58beeea13a8aae8e5b779d33f54a to your computer and use it in GitHub Desktop.
Save anharathoi/bbea58beeea13a8aae8e5b779d33f54a to your computer and use it in GitHub Desktop.
Kahoot quiz: JavaScript revision 30 May 2019

What keyword can we use to raise an error in JavaScript?

  1. catch
  2. try
  3. throw
  4. error

ANSWER: 3


What block statement can we use to run code no matter if a try / catch raises an error or not?

  1. try
  2. finally
  3. catch
  4. else

ANSWER: 2


“1” !== 1 what does this expression evaluate to?

  1. TRUE
  2. FALSE
  3. undefined
  4. null

ANSWER: 1


What keyword can we use if we want to exit a loop without finishing the rest of it’s iterations?

  1. break
  2. continue
  3. next
  4. exit

ANSWER: 1


let num = -1 || “one" ; what will num be?

  1. “one"
  2. undefined
  3. null
  4. -1

ANSWER: 4


“1” != 1

  1. TRUE
  2. FALSE
  3. undefined
  4. null

ANSWER: 2


let num = 0 || “one"

  1. “one"
  2. undefined
  3. null
  4. 0

ANSWER: 1


What method can we use in a promise to say it was successful?

  1. return
  2. resolve
  3. reject
  4. success

ANSWER: 2


What method can we use in a promise to say it was unsuccessful?

  1. error
  2. return
  3. reject
  4. catch

ANSWER: 3


null || "one"

  1. "one"
  2. FALSE
  3. undefined
  4. null

ANSWER: 1


References:

  1. https://developer.mozilla.org/en-US/docs/Glossary/Falsy
  2. https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment