JavaScript Scope: Block Scope Before ES6

ProminentLarimar1965 avatar
ProminentLarimar1965
·
·
Download

Start Quiz

Study Flashcards

5 Questions

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

It becomes a global variable

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

var

In which mode does all modern browsers support running JavaScript?

Strict mode

When does the lifetime of a JavaScript variable start?

When it is declared

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

They are deleted

Test your knowledge about JavaScript scope and the introduction of block scope with the let and const keywords in ES6. Learn about the differences between global scope, function scope, and block scope in JavaScript variables.

Make Your Own Quizzes and Flashcards

Convert your notes into interactive study material.

Get started for free

More Quizzes Like This

Use Quizgecko on...
Browser
Browser