JavaScript Scope: Block Scope Before ES6
5 Questions
2 Views

Choose a study mode

Play Quiz
Study Flashcards
Spaced Repetition
Chat to Lesson

Podcast

Play an AI-generated podcast conversation about this lesson

Questions and Answers

What happens if you assign a value to a variable that has not been declared in JavaScript?

  • It becomes a global variable (correct)
  • It becomes a function argument
  • It becomes a local variable
  • It will throw an error

Which keyword in JavaScript does create a property on the global window object?

  • var (correct)
  • const
  • let
  • function

In which mode does all modern browsers support running JavaScript?

  • Strict mode (correct)
  • Global mode
  • Local mode
  • Window mode

When does the lifetime of a JavaScript variable start?

<p>When it is declared (A)</p> Signup and view all the answers

What happens to global variables in a web browser when you close the browser window?

<p>They are deleted (A)</p> Signup and view all the answers

More Like This

JavaScript Blocks and Scope
13 questions

JavaScript Blocks and Scope

OrderlyExtraterrestrial avatar
OrderlyExtraterrestrial
JavaScript Scope Quiz
8 questions

JavaScript Scope Quiz

WellBehavedSardonyx1186 avatar
WellBehavedSardonyx1186
Use Quizgecko on...
Browser
Browser