Difference Between Null and Undefined in JavaScript ,Interview Question Series Part 1

Опубликовано: 10 Май 2025
на канале: Snehasis Ghosh
62
3

Hi everyone, and welcome back to our JavaScript Interview Question series. In this video, we're going to talk about the difference between null and undefined in JavaScript.

In JavaScript, both null and undefined represent absence of a value, but they are not the same. Undefined means that a variable has been declared but has not yet been assigned a value, or a function has no return statement, or an object property doesn't exist. Null, on the other hand, is an assigned value that represents no value or empty object.

Timestamps :
00:00 - Intro
00:09 - Brief Discuss
00:16 - undefined
00:39 - null
01:12 - Difference between both

Background Music -
AERØHEAD - Path Of The Fireflies" is under a Creative Commons
(CC BY-SA 3.0) license