К содержимому
learnspaceYOUR NEXT CHAPTER
ПРОСТРАНСТВО ОБУЧЕНИЯ
ГлавнаяКаталог курсовМоё обучениеCoursera

Знания без границ

Учитесь у лучших университетов и компаний мира.

Открыть Coursera
Интеграция
Пространство университета
Моё пространствоСтраница курса
↵
ЯЛичный кабинетСтудент
© 2026 LearnSpaceКаждый день — возможность узнать больше.Помощь
Mastering JavaScript Variables – VAR, LET & CONST in 2025 · LearnSpace
Назад в каталог
courseraПрограммирование

Mastering JavaScript Variables – VAR, LET & CONST in 2025

Курс от Packt
Средний≈ 9.2 чАнглийский
О курсеНавыкиПрограммаПреподаватели

О курсе

Updated in May 2025. This course now features Coursera Coach! A smarter way to learn with interactive, real-time conversations that help you test your knowledge, challenge assumptions, and deepen your understanding as you progress through the course. This course is designed to provide in-depth knowledge of JavaScript variable declarations, focusing on the differences between VAR, LET, and CONST. By the end of this course, learners will have a clear understanding of how these declarations affect variable scope, execution contexts, and best practices in modern JavaScript development. This knowledge is crucial for writing cleaner, more efficient code and avoiding common pitfalls that developers face when handling variables. The course begins by introducing essential concepts like execution contexts, scope, and temporal dead zones, which are foundational to understanding how JavaScript handles variable declarations. As you progress, you will explore the evolution of VAR, LET, and CONST, along with detailed insights into the reasons JavaScript differentiates between variable declarations and initializations. The second part of the course dives deep into the mechanics of variable hoisting and how the debugger tool can be used to analyze variable scope. Through practical examples, you will also learn about the unique behaviors of VAR, LET, and CONST, such as redeclaration and reassignment rules, and their impacts on block and function scopes. This course is ideal for developers of all levels who are eager to understand the nuances of JavaScript variable handling. It is particularly beneficial for those who want to write clean, maintainable, and error-free JavaScript code. No prior experience with advanced JavaScript topics is required, but familiarity with basic JavaScript concepts will be helpful.

Навыки, которые вы освоите

JavascriptDebuggingWeb Development ToolsContext Management

Программа курса

6 модулей · 76 учебных материалов

01 Introduction to Variable Lifecycle and Scope in JavaScript31 материалов

Introduction

Course IntroductionВидеоFull Course ResourcesЧтениеIntro to Variables, Execution Context, Temporal Dead Zones, Scope, and MoreВидеоTemporal Dead ZoneВидео

Учитесь у экспертов

Packt - Course Instructors

Преподаватель курса

Mastering JavaScript Variables – VAR, LET & CONST in 2025
В каталоге вашей программы

Инвестируйте в себя

Новые знания — в удобное для вас время.

Начать на Coursera

Обучение откроется на Coursera
в новой вкладке

Обучение на Coursera

≈ 9.2 ч

6 модулей

Язык: Английский

Субтитры: Арабский, Французский, Итальянский, Бразильский португальский, Корейский, Немецкий, Индонезийский, Испанский, Японский, Казахский

Часть программы вашего университета
History of VAR, LET, and CONSTВидео
The 3 Stages of a Variable's Life, and the Million Dollar QuestionВидео
Reasons Why JS Distinguishes Between Variable Declarations vs InitializationsВидео
Variable HoistingВидео
Using "Debugger" to Examine Scope of Functions and VariablesВидео
Why is VAR Initialized with the Value of "Undefined"?Видео
VAR Allows Reassignment and Redeclaration, and Some Problems with VARВидео
LET Allows Reassignment but Not RedeclarationВидео
CONST Prohibits Reassignment but Does Not Enforce ImmutabilityВидео
Scope IntroВидео
Global Scope - VAR, LET, and CONST Are All Global Scoped. VAR Goes Further.Видео
Why Adding Properties to the Global Object Is Generally Not a Good IdeaВидео
Function Scope - VAR, LET, and CONSTВидео
Comparing C and JavaScript Function Scope with VARВидео
Module Scope - VAR, LET, and CONST Are All Confined to ModulesВидео
Block Scope - LET and CONST Are Block ScopedВидео
VAR Hacks, IIFEs, and "Use Strict"Видео
VAR Is Not Block ScopedВидео
Nested Scopes and ShadowingВидео
Temporal Dead Zone - Why Was It Created?Видео
What Does "Temporal" Mean in "Temporal Dead Zone"?Видео
Example - Identifying Overall ScopeВидео
Example - Identifying Variable ScopeВидео
Example - Global Execution Context and the Call StackВидео
Example - Function Execution Context and the Call StackВидео
Example - Block Scope and Final WordsВидео
Introduction to Variable Lifecycle and Scope in JavaScript - AssessmentЗадание
02JavaScript's Execution Context - Creation Phase19 материалов

JavaScript's Execution Context - Creation Phase

Does the JavaScript Engine Move Your Code Around?ВидеоIntro to VAR, and Execution ContextsВидеоWhat You Are About to Learn Is Very Practical (and Advanced)ВидеоWhat Is an Execution Context (Phases and Types)?ВидеоIntro to the Realm RecordВидеоThe 3 Most Important Fields That the Realm Record CreatesВидеоThe [[Intrinsics]] FieldВидеоThe [[GlobalObject]] FieldВидеоWhat Are Environment Records?ВидеоThe [[GlobalEnv]] FieldВидеоGlobal Variable RecapВидеоThe [[VarNames]] Field, and RecapВидеоLexical and Variable EnvironmentВидеоBasic Example with a Blank app.js FileВидеоExample - Setting Up the Global Execution ContextВидеоExample - Assigning the Global Variables and Function to the Correct FieldsВидеоFunction Object IntroВидеоUnderstanding Execution Contexts and Environment Records in JavaScriptDIALOGUEJavaScript's Execution Context - Creation Phase - AssessmentЗадание
03JavaScript's Execution Context - Execution Phase7 материалов

JavaScript's Execution Context - Execution Phase

Execution Phase and the Call StackВидеоExample Execution - Part 1ВидеоFunction Execution Context - How It Works Under the HoodВидеоExample Execution - Part 2ВидеоQuasi Code Walkthrough from a Developer's PerspectiveВидеоJavascript Execution Phase and Call StackDIALOGUEJavaScript's Execution Context - Execution Phase - AssessmentЗадание
04VAR, LET, CONST and BLOCKS8 материалов

VAR, LET, CONST and BLOCKS

VAR Definition as per ECMAScriptВидеоLET Definition as per ECMAScriptВидеоWhat Happens If You Try and Redeclare a LET VariableВидеоBLOCK Definition as per ECMAScriptВидеоBLOCK ExampleВидеоFinal Example to Drive the Point HomeВидеоUnderstanding Variable Declarations in JavaScriptDIALOGUEVAR, LET, CONST and BLOCKS - AssessmentЗадание
05Lexical vs Dynamic Scoping4 материалов

Lexical vs Dynamic Scoping

Introduction to Scoping in JavaScript (with an Example)ВидеоLexical Scoping vs Dynamic Scoping with Bash ExampleВидеоUnderstanding Lexical Scoping in JavaScriptDIALOGUELexical vs Dynamic Scoping - AssessmentЗадание
06Wrapping Up with Immutability and VAR Best Practices7 материалов

Outro

CONST Variables and ImmutabilityВидеоUsing CONST with Object.freeze() to Ensure True ImmutabilityВидеоUse Cases for VARВидеоOutroВидеоWrapping Up with Immutability and VAR Best Practices - AssessmentЗаданиеFull Course Practice AssessmentЗаданиеFull Course AssessmentЗадание