Skip to content

Instantly share code, notes, and snippets.

@anharathoi
Created June 12, 2019 01:43
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/422693e10f51f7d88bcdcc3489cbe6d8 to your computer and use it in GitHub Desktop.
Save anharathoi/422693e10f51f7d88bcdcc3489cbe6d8 to your computer and use it in GitHub Desktop.

What ES6 keyword do we use to declare a variable that can be mutated?

  1. var
  2. let
  3. const
  4. def

What statement does a promise run if it resolves correctly?

  1. then
  2. try
  3. catch
  4. switch

What is the value of brand here:

  const { brand } = {
    type: "phone",
    brand: "Apple" 
  }
  1. Apple
  2. undefined
  3. phone
  4. { type: "phone", brand: "Apple" }

What is the value of brand here:

const { brand } = { 
  type: "phone",
  company: "Apple" 
}
  1. Apple
  2. undefined
  3. phone
  4. { type: "phone", brand: "Apple" }

What statement does a promise run if it rejects?

  1. then
  2. try
  3. catch
  4. switch

What platform do we use to execute JavaScript outside of the browser?

  1. Express
  2. Node
  3. React
  4. VSCode

What's the value of x?: let x = null && "a"

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

What's the value of x?: let x = null || "a"

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

If we want to use the await keyword, what keyword must be used by our function?

  1. try
  2. resolve
  3. async
  4. catch

What library can we use to make an HTTP request in JavaScript?

  1. fetch
  2. axios
  3. react
  4. none

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