From 22beb5997fd80b8411faf76bb66f16e511ffb0fc Mon Sep 17 00:00:00 2001 From: VINAY KUMAR <81864965+VinayDevv@users.noreply.github.com> Date: Fri, 31 Oct 2025 15:01:59 +0530 Subject: [PATCH] fix(curriculum) : Typo in "The var Keyword and Hoisting" (#63357) --- .../67335f45489c5a11b71d0ed5.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/curriculum/challenges/english/blocks/lecture-the-var-keyword-and-hoisting/67335f45489c5a11b71d0ed5.md b/curriculum/challenges/english/blocks/lecture-the-var-keyword-and-hoisting/67335f45489c5a11b71d0ed5.md index cc2fe49a5b3..4c06c394322 100644 --- a/curriculum/challenges/english/blocks/lecture-the-var-keyword-and-hoisting/67335f45489c5a11b71d0ed5.md +++ b/curriculum/challenges/english/blocks/lecture-the-var-keyword-and-hoisting/67335f45489c5a11b71d0ed5.md @@ -16,7 +16,7 @@ Let's start with variables hoisting, when you declare a variable using the `var` ```js console.log(x); // undefined var x = 5; -console.log(5); // 5 +console.log(x); // 5 ``` In this code even though we use `x` before declaring it we don't get an error, instead we get `undefined`. This is because JavaScript hoists the declaration `var x` to the top of its scope but not the initialization `x = 5`. It's as if the code were rewritten like this: @@ -40,7 +40,7 @@ function sayHello(){ In this case, we can call `sayHello()` before its declaration because the entire function is hoisted to the top of its scope. -It's important to note that hoisting works differently with `let` and `const` declarations introduced in ES6. +It's important to note that hoisting works differently with `let` and `const` declarations introduced in ES6. ```js console.log(y); // Throws a ReferenceError