Are You Using Null And Undefined Wrong?

  Рет қаралды 70,338

Web Dev Simplified

Web Dev Simplified

Күн бұрын

Null and undefined may seem like the same thing, but they are actually quite different. In this video I cover all the similarities and differences between null and undefined.
📚 Materials/References:
Null Vs Undefined Article: blog.webdevsimplified.com/202...
Double Vs Triple Equals Video: • JavaScript == VS ===
Double Vs Triple Equals Article: blog.webdevsimplified.com/202...
🌎 Find Me Here:
My Blog: blog.webdevsimplified.com
My Courses: courses.webdevsimplified.com
Patreon: / webdevsimplified
Twitter: / devsimplified
Discord: / discord
GitHub: github.com/WebDevSimplified
CodePen: codepen.io/WebDevSimplified
⏱️ Timestamps:
00:00 - Introduction
00:52 - Similarities
01:44 - What Is Null
02:33 - What Is Undefined
03:08 - Tricky Parts
#Null #Undefined #NullVsUndefined

Пікірлер: 153
@satyasrikar709
@satyasrikar709 3 жыл бұрын
“Everything is undefined until you define it” -Kyle, 2021
@321b_productions
@321b_productions Жыл бұрын
Nicee
@maelstrom57
@maelstrom57 3 жыл бұрын
Another big difference is that in an arithmetic operation, null essentially behaves like 0 while undefined will make the result NaN. 1 + null === 1; 1 * null === 0; 1 + undefined; // NaN
@RC-14
@RC-14 3 жыл бұрын
Also undefined has its own type while null is an object.
@wolframzell6162
@wolframzell6162 3 жыл бұрын
Other languages: you can't add strings and numbers. JS: you can multiply by an empty object-pointer.
@simpingsyndrome
@simpingsyndrome 3 жыл бұрын
so null=0 yeah
@karimmirak2158
@karimmirak2158 3 жыл бұрын
And also use undefined to destroy a variable, null it just reset it to no typed variable but still exist and defined.
@AntonioSantos-ve6zv
@AntonioSantos-ve6zv 2 жыл бұрын
...and the lesson was easy and simple until now, with all the responses to your comment. :)
@krtirtho
@krtirtho 3 жыл бұрын
You can explain that pretty easily with a JSON file. Where if you do: *JSON.stringify({foo: undefined})* // outputs "{}" but if do this: *JSON.stringify({foo: null})* //outputs '{"foo": null}' This perfectly describes the behavior of null & undefined simply
@kanjakan
@kanjakan 3 жыл бұрын
That's basically what he said in the video. Your example would be most likely be harder for a beginner to grasp compared to Kyle's explanation.
@An7Hoang
@An7Hoang 3 жыл бұрын
@@kanjakan wouldn't thought of this JSON behavior if he's not pulling that out
@katemc516
@katemc516 3 жыл бұрын
well I hope those who ask this question at a job interview understands the difference themselves lol
@sumitmukharjee5816
@sumitmukharjee5816 2 жыл бұрын
Currently, I am binge-watching your Javascript videos like this and yeah, I have learned many simple things which were tricky to understand. Thank you so much!!
@EscherSketcher
@EscherSketcher 3 жыл бұрын
One gotcha is with Default Function Parameters. Null would not get the default value, but undefined will. function log(a = 'hi') { console.log(a) } const u = undefined log(u) // 'hi' const n = null log(n) // null
@michellegiacalone1079
@michellegiacalone1079 3 жыл бұрын
So in this case, undefined will assign an available value, but null will not?
@EscherSketcher
@EscherSketcher 3 жыл бұрын
@@michellegiacalone1079 correct, undefined will be assigned 'hi'. null will remain as null.
@michellegiacalone1079
@michellegiacalone1079 3 жыл бұрын
@@EscherSketcher Thanks!
@smartypantscoder6912
@smartypantscoder6912 3 жыл бұрын
I use null as a third value to the booleans apart from true and false. Assigning a null value to a boolean in my book means, we checked but couldn't be sure if it was true or false. While undefined variable could mean we didn't bother checking anything in the first place. It's a handy convention.
@reach9318
@reach9318 3 жыл бұрын
This is a basic concept, but many people are still confusing about it. Thank you for explaining in a clear and easy way to understand.
@TanelM
@TanelM 3 жыл бұрын
JSON doesn't have the "undefined" value, so JSON.stringify({a: undefined}) will result in an empty object, not the case with null tho. In addition ({a: undefined}).hasOwnProperty("a") will return true AND [undefined].length will return 1. So in JS there's even a difference between a value that's not defined and a value that's defined as undefined. What's even more funny is that JSON.stringify([undefined]) returns "[null]" 😅
@Supergeckos1000
@Supergeckos1000 3 жыл бұрын
In arrays it needs to be converted to null, otherwise the indexes could shift. You're losing information by not having "undefined" in JSON, so that is the best possible solution that doesn't modify the array length.
@oldclient
@oldclient 3 жыл бұрын
Damn JS conditionals!
@markmathur2296
@markmathur2296 Жыл бұрын
What you say makes soooo much sense!! Thanks for the enlightenment!
@cs-codemon5306
@cs-codemon5306 3 жыл бұрын
Day by day wds's video are becoming more funny 😄 I liked the start
@this.channel
@this.channel 3 жыл бұрын
Great job at explaining the differences.
@geekthegeek730
@geekthegeek730 3 жыл бұрын
😍 dude you are really simplifying the web
@didziszvaigzne7679
@didziszvaigzne7679 3 жыл бұрын
Very good explanation!
@mdyarafat581
@mdyarafat581 3 жыл бұрын
Hea, i've started learning js, you upload it the in the right time
@adityatripathi1904
@adityatripathi1904 2 жыл бұрын
Anyone who started learning programming with a strongly typed language should know this already. Your hard work didn't go in vain my fellow comrades.
@necrorifter3059
@necrorifter3059 3 жыл бұрын
I just assume the difference is that null means there is nothing while undefined means there is a variable or something but there is nothing attached to them or otherwise "empty".
@kennethkath6527
@kennethkath6527 3 жыл бұрын
had a lot of trouble trying to understand Objects and Classes and when I finally learned them, then came pointers
@FilipCodes
@FilipCodes 3 жыл бұрын
Aaand I understand it now. Thanks 😁
@michellegiacalone1079
@michellegiacalone1079 3 жыл бұрын
"I am naming this dog 'Unnamed'." "Well, now Unnamed is a name." "Oh. Uh..."
@emsourcemedia9178
@emsourcemedia9178 3 жыл бұрын
Can you do a course on micro-frontend ?
@chooks2228
@chooks2228 3 жыл бұрын
Another key difference is if you have any key with the value of undefined in an object and you stringify it it will drop the key entirely where as null would just stay as null.
@MusicIsLifeFM
@MusicIsLifeFM 3 жыл бұрын
thx again for this video
@harm991
@harm991 3 жыл бұрын
I find it hard to use Null in my project, because I use guard clauses and use a lot of if(value ==== undefined) return I don't use if(!value) because sometimes it can be a boolean and false will trigger the guard clause.
@Janis_P
@Janis_P 3 жыл бұрын
Just use double equals null.
@mosheritterman3472
@mosheritterman3472 3 жыл бұрын
Great Video! While I don't disagree with your theory that undefined is the default value and null is something that would be an explicit return value, if you look at the array function 'find' (developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find) you'll see that if the function can't find anything, it'll return undefined
@lukejagodzinski
@lukejagodzinski 2 жыл бұрын
Yep exactly. I think, what he said might confuse people even more. However, there are a lot of inconsistencies in JS alone. `document.querySelector()` will return null if it can't find value but `array.find()` will return undefined.
@alexbaklanov3685
@alexbaklanov3685 2 жыл бұрын
I guess because array can contain nulls as elements. const arr = [1,2,3,null]; console.log(arr.find((elem, index) => index === 3)); will print out null, because that's what it found. Although I agree, it might be confusing.
@mosheritterman3472
@mosheritterman3472 2 жыл бұрын
@@alexbaklanov3685 arrays could contain undefined elements as well const arr = [1,2,3,undefined]; console.log(arr.find((elem, index) => index === 3)); will print out undefined
@tato03130
@tato03130 3 жыл бұрын
You read my mind, I just was wondering this
@markus.schiefer
@markus.schiefer 3 жыл бұрын
I think, as a general rule, if you feel that you need to set or check for undefined, you should rethink your application logic first.
@emilOnYoutube
@emilOnYoutube 3 жыл бұрын
Like your explainers videos
@thethirdrace5107
@thethirdrace5107 Жыл бұрын
While the semantics totally makes sense, in reality you rarely need to know if the variable has been defined with no value or if the variable has NOT been defined at all. What you really need to know in practice is if the variable or property has a value or not. Given this concept, using `null` has huge downsides: - you introduce a third typing to your variables => a lot more code to validate (ex: string | undefined | null) - you're actually hinting that you made sure to actually define a variable with no value, meaning I should check if there was a reason for that => I'm gonna waste a huge amount of time chasing ghosts because you couldn't be bothered to tell me explicitly that initializing the variable had no meaning beside your own personal preferences `null` is for a very very specific case: you want to track that the variable exists AND that you specifically set it to no value. This will actually happen maybe 10 times in your entire JS/TS career. My advice is to stop over-complicate things and just use `undefined`. It will simplify testing conditions everywhere. And a bit off-topic but related, try as much as possible to define your data with as less typings as possible. [ Examples ] `string | undefined` is much simper at every level than `string | undefined | null`. Not to mention `string | null` would be an atrocity because it's pretty sure at some point a property in an object would be undefined so it will eventually turn to `string | undefined | null` and you'll be back to the huge pile of problems. `boolean` with a default value is always better than `boolean | undefined`. Pick a default value and deal with it at one place instead of having to test the typings at every single condition throughout your code. Same with `Array` or `[ ]`. Never use `undefined`, always use an empty array instead. You'll deal with the problem once at initialization instead of having to test if the array is undefined everytime you want to use the data. It's always better to deal with the problem at the source than patching everywhere down the line...
@NetherworldBibliotek
@NetherworldBibliotek 5 ай бұрын
When my console logs 'x is undefined' it usually means there's a typo in my code.
@jazzmaster89
@jazzmaster89 3 жыл бұрын
How about for the .match() function? If no matches are located, null is returned natively. Wonder if there are any others.
@SGIMartin
@SGIMartin 3 жыл бұрын
well - .match() is a function, so it follows along with the reasoning that a programmer has specifically implemented that as a return when no results are found. I believe there are more comparison functions that do this, but I'm not that sharp on JS
@biliyonnet
@biliyonnet 3 жыл бұрын
You can mention about NaN constant that it is equal to nothing in javascript, even itself. Javascript crazy and i love it.
@biliyonnet
@biliyonnet 3 жыл бұрын
@@EidosX_ that is cool, learned a new thing for today. i preciated for the info.
@oldclient
@oldclient 3 жыл бұрын
Damn JS conditionals. Most confusing is that primitive types can be null. True, undefined is unasigned variable or the variable defined as an abstract being in a code text like a comment. Since JS is a descendant of Java and Java is a descendant of C language, the null in JS must work similarly as in C language. So null, in comparison to undefined, is a defined by compiler or interpreter variable which points to a non mapped address. Sometime it's expressed as the integer value 0 converted to type void. It explains the next JS conditionals: 1 + null === 1 and 1 / null === Infinity. For ref types, null represents a pointer address in the stack memory which don't point to any object or array address in the heap memory. I know, my arguments are rough.
@chaitanyapillella6634
@chaitanyapillella6634 3 жыл бұрын
hi there, do you have full HTML and CSS course for beginners? i cant find in your playlists, i would love you have it because narration is really simple and easy to understand
@aammssaamm
@aammssaamm 3 жыл бұрын
Just read a book.
@chaitanyapillella6634
@chaitanyapillella6634 3 жыл бұрын
@@aammssaamm if i wanted to read a book i wouldnt be asking the question, would i?
@aammssaamm
@aammssaamm 3 жыл бұрын
@@chaitanyapillella6634 That's a problem that you cannot read a book, you need someone to digest it for you. Do you really think BAs will be making a BRD video for you, or all documentation will be converted into a video format?
@chaitanyapillella6634
@chaitanyapillella6634 3 жыл бұрын
@@aammssaamm i dont know whats your problem mind your own business whether they make a video or not thats their problem. i didnt ask you to do it, did i?
@aammssaamm
@aammssaamm 3 жыл бұрын
@@chaitanyapillella6634 oh, sorry for telling you that BRD doesn't come in a video format.
@igorswies5913
@igorswies5913 3 жыл бұрын
I think the easiest way to cope with this is to never say undefined in your code. but maybe there are interesting use cases idk
@abderehmen783
@abderehmen783 3 жыл бұрын
well explained
@tahirsaeed99ts
@tahirsaeed99ts 2 жыл бұрын
So basically null itself is a value that defines that the variable it is assigned to have no value? On the other hand undefined means that no value is yet assigned to the variable?
@sonamuhialdeen7866
@sonamuhialdeen7866 3 жыл бұрын
So good tutorial
@helw7
@helw7 2 жыл бұрын
=== is mostly much faster than == .. so I always use === .. When I compare variables that are not of the same type, I normalize them before I compare them. Triple Equal is, in my opinion, a much cleaner way and faster too.
@ikeo8666
@ikeo8666 3 жыл бұрын
so why do map operations return undefined when they can't find stuff?
@sidharth5665
@sidharth5665 2 жыл бұрын
Same as methods will return undef if they have not any return value
@ayushdedhia25
@ayushdedhia25 3 жыл бұрын
The guitar 🎸 in the corner looks amazing 💯❤️🔥
@aram5642
@aram5642 3 жыл бұрын
But it is undefined until Kyle has played something for us.
@ayushdedhia25
@ayushdedhia25 3 жыл бұрын
@@aram5642 True 😂
@joejavacavalier2001
@joejavacavalier2001 3 жыл бұрын
Is setting a variable with a big object or big array to NULL in the hopes of garbage collection an antipattern?
@RCL89
@RCL89 2 жыл бұрын
I'd say that depends on the scope of the variable and how long the scope lives. If you're nulling all variables everytime as soon as you don't need them anymore, even if the scope of the variable ends like immediately after it, that becomes hard to read, understand, is over-engineered and is likely unnecessary. But on the other hand, if your variable is in the global scope (window), or in a scope that lives very long, this might be a good thing to do. If you're doing everything in the global scope, that's an anti-pattern by itself. In general: try to encapsulate things in meaningful scopes (Separation of Concern). Once the scope ends, the variables of this scope cease to exist and the objects they were referencing to can be detected by the garbage collector as unreachable and their memory space can be used for something else.
@HakunaMatata-it2qr
@HakunaMatata-it2qr 3 жыл бұрын
Please make video on TypeORM with node.js..!😌
@samhanna7382
@samhanna7382 3 жыл бұрын
i just want that haircut tutorial
@thebavarian6181
@thebavarian6181 3 жыл бұрын
Most of the time I use this topic to check if DOM Elements exist or not: if (typeof DOMElement != "undefined" && DOMElement != null) {doSomething} What do you think of that? Good or bad use?
@davidjensen6215
@davidjensen6215 3 жыл бұрын
Just use: if (!DOMElement) {doSomething}
@brabenetz
@brabenetz 3 жыл бұрын
And if you get "Nothing" instead of null or undefined, then the *Update* on this StackOverflow post is the solution: stackoverflow.com/questions/7568471/pass-nothing-from-javascript-to-vbscript-in-ie9
@kellyc7c
@kellyc7c 9 ай бұрын
I hate having both null and undefined as the 'empty' value, and I find little use with the semantic difference. It's even worse that you can set object properties to undefined, which breaks the semantic difference and isn't compatible with JSON 😒
@jenstornell
@jenstornell 3 жыл бұрын
Defining something as undefined seems really awkward. 🤣😅
@wolframzell6162
@wolframzell6162 3 жыл бұрын
Welcome to JS ^.^
@addictinggames5232
@addictinggames5232 2 жыл бұрын
null is a blank int value that the systems identifies as null but returns as zero. undefined is the result of a blank int value as zero and using it in a divisionary equation, returning back undefined (can't divide by zero). null can be used as a placeholder/trade value for processing whilst undefined is the definition of a garbage output value - whose only objective is to signal to the programmer (or code, if accounted for) that you created some bullshit it can't use any further.
@yamogebrewold8620
@yamogebrewold8620 3 жыл бұрын
A more interesting topic would be error handling, like when is it reasonable to throw errors, and when should you simply return silently out of functions.
@Musikur
@Musikur 3 жыл бұрын
Throw an error when the function can't continue in the way it is intended, and silently handle when the function can continue
@JohnSmith-yr7ih
@JohnSmith-yr7ih 3 жыл бұрын
Tankyou! please make clone of jsonplaceholder locally. it will help deep understanding of nodejs
@alexmercer5870
@alexmercer5870 3 жыл бұрын
Just watching this lecture from kyle Simpsons, And another Kyle uploaded this video 😹
@faustovii1085
@faustovii1085 Жыл бұрын
you've really simplified this one...
@joeyalfaro2323
@joeyalfaro2323 3 жыл бұрын
My best advice for learning this shit be honest with yourself. If something is not clear as day figure it out dig. It's just bits and pieces here and there. Good luck to all only danger is giving up.
@MonsterlessonsAcademy
@MonsterlessonsAcademy 3 жыл бұрын
This is the first that I really hate about Javascript. Why not just nil as in other languages. My way to work with them is everywhere use nulls and avoid undefineds completely. In this case everything is looking the same and is just like in other languages
@akash02k
@akash02k 2 жыл бұрын
We need a hair care tutorial
@Stoney_Eagle
@Stoney_Eagle 3 жыл бұрын
You have to define the variable as null to make it null.
@zac1976
@zac1976 3 жыл бұрын
Are you using null and undefined wrongly? Are you wrongly using null and undefined? :D Nice video by the way.
@renu3463
@renu3463 3 жыл бұрын
React content needed 🙏🙏🙏🙏
@user-og9nl5mt1b
@user-og9nl5mt1b 3 жыл бұрын
Buy his course
@renu3463
@renu3463 3 жыл бұрын
@@user-og9nl5mt1b 😑 that not the best answer.
@jasonstarkey2653
@jasonstarkey2653 3 жыл бұрын
@@renu3463 it actually is the best answer. Go support the creator, otherwise don't ask for something specific for free
@KevinVandyTech
@KevinVandyTech 3 жыл бұрын
He already has some of the most comprehensive react content on KZfaq. Just search for it
@zeal1059
@zeal1059 3 жыл бұрын
He has created a lot of free and comprehensive content here bhai. Baki khareed if u want something extra.
@sekkaddou1267
@sekkaddou1267 2 жыл бұрын
FINALLY I UNDERSTAND WTFF !!!
@lurkinginthedark6498
@lurkinginthedark6498 3 жыл бұрын
Me who have already been using js for years asking to my self, am i doing it right lol
@oddity4650
@oddity4650 3 жыл бұрын
Nope as you missed a comma also spent color as colour...
@victorcallender1311
@victorcallender1311 3 жыл бұрын
Lol
@love-hammer
@love-hammer 3 жыл бұрын
So the distinction is useful for debugging but ONLY if people recognize that and never define something as undefined? Super.
@chhavimanichoubey9437
@chhavimanichoubey9437 3 жыл бұрын
soon I'm starting JavaScript fundamentals your view count in old videos is going to increase
@chinnunarra2744
@chinnunarra2744 3 жыл бұрын
Well is null===not defined?
@aMacGyver219
@aMacGyver219 3 жыл бұрын
not at all
@user-og9nl5mt1b
@user-og9nl5mt1b 3 жыл бұрын
No
@user-jw8er7lg8m
@user-jw8er7lg8m 2 ай бұрын
Instead of using null and making the distinction between the two that isn't enforced by the language and will cause confusion, it's better to never use null and only use undefined. if you see null in your codebase that is a code smell. listen to what douglas crockford has to say about null to learn more.
@annaivanova7542
@annaivanova7542 3 жыл бұрын
Can you make a video on lit-html?
@renu3463
@renu3463 3 жыл бұрын
What?! Are you using lit html in 2021? Well it's like you should not learn it but the amount of support you get for "popular" frameworks or libraries, you don't get that for lit html and maybe lack of support is the reason you are asking here for tutorial. #Reactjs
@annaivanova7542
@annaivanova7542 3 жыл бұрын
Nope I'm just student and I would like to see some better explaination on in it that's it. React is in my program for next semester 😊 But tanks for your input
@renu3463
@renu3463 3 жыл бұрын
@@annaivanova7542 student of computer science? (If you don't mind)
@annaivanova7542
@annaivanova7542 3 жыл бұрын
@@renu3463 yes 🙂
@renu3463
@renu3463 3 жыл бұрын
@@annaivanova7542 I just don't believe that they "teach" React in the computer science classes 😂😂😂. It's like: "so today we are discussing components...."
@turing4991
@turing4991 3 жыл бұрын
I learned this in sixth grade.
@JR-mk6ow
@JR-mk6ow 3 жыл бұрын
BTW 'undefine' a variable is usually less performant than initialize a new variable. Re-use variables is not a thing in JS (unless you know what you are doing)
@friedec3622
@friedec3622 Жыл бұрын
Null is bad enough that people nowadays don't use it. Javascript: introduce undefined
@Cybah
@Cybah 3 жыл бұрын
1:41 don't you mean triple equals?
@oddity4650
@oddity4650 3 жыл бұрын
Why is equal == not = as basic maths one = means equal 🤯❔
@levani7851
@levani7851 3 жыл бұрын
because when you write x = 1 you are assigning value of 1 to the variable x, if you do x == 1, you are checking if the value 1 equals to the value stored in x
@SGIMartin
@SGIMartin 3 жыл бұрын
just to add to Arx - some programming languages use a single "=" to compare (see pascal, and other derivatives) - but using a limited amount of operators means that we have to make combinations to cover all different functionalities
@oddity4650
@oddity4650 3 жыл бұрын
@@levani7851 oh when someone uses one = it labels whatever info it is the same as? Like x = car then in some other bit of the code language it might say (if x is car then true)...
@SGIMartin
@SGIMartin 3 жыл бұрын
@@oddity4650 Yes - ill just create a simple example here in js syntax: let i = 2 // This saves a space in your computers memory with the integer value 2 i is a key to a specific address in memory, so when you use "i" it knows what memory location its should look at and what format of data is saved there, and at this address the value 2 is saved. If you then do console.log(i === 2) // it should print true - the triple "===" Is javascript specific, and is a way to compare values, "===" is strict comparison, so not only does the value have to match, the type has to match too, whereas "==" only compares values so "=" is the assignment operator and "==" and "===" are comparison operators
@rurk7943
@rurk7943 2 жыл бұрын
If a variable or object has no value which equals null...then why leave it in the code i can understand having an undefined object because it could be useful at a later time but defining something as null makes no sense to...I am definitely a novice
@forreal_bhenchod
@forreal_bhenchod 2 жыл бұрын
I lose my job as trainee software engineer because don't know this concept
@Gadrawingz
@Gadrawingz 3 жыл бұрын
if(webSkills == null || webSkills=indefined) { simplify("web", "Kylie"); }
@qwertt14
@qwertt14 3 жыл бұрын
simple, one is 𝚗𝚞𝚕𝚕 and the other is 𝚞𝚗𝚍𝚎𝚏𝚒𝚗𝚎𝚍
@user-jw8er7lg8m
@user-jw8er7lg8m 2 ай бұрын
A distinction without a difference. it's better to never use null and mark it as a code smell that needs to be cleaned up. listen to what the inventor of JSON has to say about null.
@deansprivatearchive
@deansprivatearchive 3 жыл бұрын
58th
@srinathmuthusamy9661
@srinathmuthusamy9661 3 жыл бұрын
More vanilla js
@321b_productions
@321b_productions 2 жыл бұрын
I can guess it. "undefined" means that the variable is undefined. "null" means that the variable doesn't have a value.
@misterrodger
@misterrodger 3 жыл бұрын
Null means a dev wrote null.
@codingwithkenny6492
@codingwithkenny6492 3 жыл бұрын
9th comment!
@alagappank1242
@alagappank1242 3 жыл бұрын
Do a javascript Tutorial...
@aammssaamm
@aammssaamm 3 жыл бұрын
Oh, boy, there are tons of them.
@azackmatoff2570
@azackmatoff2570 3 жыл бұрын
JS hates logic
@alejandroarmas7240
@alejandroarmas7240 3 жыл бұрын
Why am I pinned?
@maelstrom57
@maelstrom57 3 жыл бұрын
lol
@kunalbabbar7399
@kunalbabbar7399 3 жыл бұрын
Undefined = variable doen't exist Null = varibale exist but does'nt have any value
@pyroghost11
@pyroghost11 3 жыл бұрын
wrong
@marcscherzer
@marcscherzer 3 жыл бұрын
Isn't it reversed? Undefined = varibale exist but does'nt have any value Null = variable doen't exist
@soniablanche5672
@soniablanche5672 3 жыл бұрын
undefined === void 69
@oddity4650
@oddity4650 3 жыл бұрын
What made you think of 69...
@soniablanche5672
@soniablanche5672 3 жыл бұрын
@@oddity4650 the number doesn't matter, I just picked a NICE number
@oddity4650
@oddity4650 3 жыл бұрын
@@soniablanche5672 😀 well it depends if there is a gremlin haning off a number
@oddity4650
@oddity4650 3 жыл бұрын
Undefined just seems like waste of time coding that, I am not a fan of computers languages that has things like undefined but they don't actually do anything at all other then labeling something.
Why Is Array/Object Destructuring So Useful And How To Use It
13:24
Web Dev Simplified
Рет қаралды 420 М.
Learn JavaScript DOM Traversal In 15 Minutes
14:44
Web Dev Simplified
Рет қаралды 220 М.
OMG🤪 #tiktok #shorts #potapova_blog
00:50
Potapova_blog
Рет қаралды 17 МЛН
I CAN’T BELIEVE I LOST 😱
00:46
Topper Guild
Рет қаралды 65 МЛН
Каха ограбил банк
01:00
К-Media
Рет қаралды 10 МЛН
Мы никогда не были так напуганы!
00:15
Аришнев
Рет қаралды 4,2 МЛН
Use Arc Instead of Vec
15:21
Logan Smith
Рет қаралды 137 М.
Object Oriented Programming vs Functional Programming
18:55
Continuous Delivery
Рет қаралды 747 М.
Learn Debounce And Throttle In 16 Minutes
16:28
Web Dev Simplified
Рет қаралды 179 М.
💥 Typescript  Understanding Null vs Undefined
8:07
Angular University
Рет қаралды 4 М.
Learn CORS In 6 Minutes
6:06
Web Dev Simplified
Рет қаралды 706 М.
Is the COST of JavaScript’s GC REALLY that high?
13:52
SimonDev
Рет қаралды 90 М.
Why Every Computer Fails Basic Math
17:20
Web Dev Simplified
Рет қаралды 21 М.
Learn React Query In 50 Minutes
51:09
Web Dev Simplified
Рет қаралды 272 М.
Learn JavaScript Scoping In 10 Minutes
11:39
Web Dev Simplified
Рет қаралды 58 М.
OMG🤪 #tiktok #shorts #potapova_blog
00:50
Potapova_blog
Рет қаралды 17 МЛН