- Популярные видео
- Авто
- Видео-блоги
- ДТП, аварии
- Для маленьких
- Еда, напитки
- Животные
- Закон и право
- Знаменитости
- Игры
- Искусство
- Комедии
- Красота, мода
- Кулинария, рецепты
- Люди
- Мото
- Музыка
- Мультфильмы
- Наука, технологии
- Новости
- Образование
- Политика
- Праздники
- Приколы
- Природа
- Происшествия
- Путешествия
- Развлечения
- Ржач
- Семья
- Сериалы
- Спорт
- Стиль жизни
- ТВ передачи
- Танцы
- Технологии
- Товары
- Ужасы
- Фильмы
- Шоу-бизнес
- Юмор
What's the output? Q19 #coding #interviewquestions #programming #javascript #learnjavascript #code
Ever wondered why console.log(this === window) logs true in JavaScript? 👀
In this short, we break down a common yet tricky JavaScript interview question that tests your understanding of the this keyword and the global window object.
💡 Explanation: In the global context (outside any function), the value of this in JavaScript refers to the global object.
In browsers, the global object is window.
So when you write console.log(this === window), you're essentially checking if the current context (this) is the window — which it is in the global scope.
✅ Hence, it returns true.
But remember — this behavior can change:
Inside strict mode
Inside functions or classes
In modules
🔄 That’s why it’s important to understand context when working with this. It's not about where a function is declared — it's about how it's called.
🧠 This is one of the most commonly asked JavaScript interview questions, especially in frontend and web developer interviews. Make sure you fully understand how this behaves in different environments: browsers vs Node.js, global vs strict mode, arrow functions vs regular functions.
🧪 Want to level up your JavaScript fundamentals? Hit that like, drop a comment with your doubts or insights, and don’t forget to subscribe for more quick dev explainers!
#javascript #webdevelopment #frontendinterview #codinginterview #jsinterviewquestions #thiskeyword #windowobject #globalcontext #codingtips #learnjavascript #javascriptshorts #frontenddeveloper #softwareengineering #programmingfundamentals #developerlife #devshorts #ytshorts #codeexplained #browserjavascript
Видео What's the output? Q19 #coding #interviewquestions #programming #javascript #learnjavascript #code канала Cooking The Code
In this short, we break down a common yet tricky JavaScript interview question that tests your understanding of the this keyword and the global window object.
💡 Explanation: In the global context (outside any function), the value of this in JavaScript refers to the global object.
In browsers, the global object is window.
So when you write console.log(this === window), you're essentially checking if the current context (this) is the window — which it is in the global scope.
✅ Hence, it returns true.
But remember — this behavior can change:
Inside strict mode
Inside functions or classes
In modules
🔄 That’s why it’s important to understand context when working with this. It's not about where a function is declared — it's about how it's called.
🧠 This is one of the most commonly asked JavaScript interview questions, especially in frontend and web developer interviews. Make sure you fully understand how this behaves in different environments: browsers vs Node.js, global vs strict mode, arrow functions vs regular functions.
🧪 Want to level up your JavaScript fundamentals? Hit that like, drop a comment with your doubts or insights, and don’t forget to subscribe for more quick dev explainers!
#javascript #webdevelopment #frontendinterview #codinginterview #jsinterviewquestions #thiskeyword #windowobject #globalcontext #codingtips #learnjavascript #javascriptshorts #frontenddeveloper #softwareengineering #programmingfundamentals #developerlife #devshorts #ytshorts #codeexplained #browserjavascript
Видео What's the output? Q19 #coding #interviewquestions #programming #javascript #learnjavascript #code канала Cooking The Code
Комментарии отсутствуют
Информация о видео
15 мая 2025 г. 17:13:09
00:01:28
Другие видео канала




















