undefined or null
the var a in this program is not defined. so it is printing undefined. but the tutorial guy is getting null value as result but i am getting undefined. can anyone tell me why? https://code.sololearn.com/WFVPAcuaTrQK/?ref=app
Because your variable doesn't have value. So it is showing undefined.
Vanilla JS always assigns unassigned variables (without an initial value) to undefined, undefined being an primitive data type. Null is the *intentional* absence of an object. I am really confused, I don't know why he is getting null. Maybe modified JS, interpreter settings (if there are any), I really don't know. I couldn't either found anything on the internet.
Are you sure the source codes were exactly the same? you're talking about the tutorial guy Youtube channel right?
Ipang he is getting null as output
Share the link of video
That's a case among UB (Undefined Behavior) ones. When a value is set without, initialization or without assigning it, so using this last one will be an ill-formed situation.
Why are my users being logged as [object Object] when logging my array/user instead of giving me the values [name, age]?
JS in sololear is latest version or older? What do we use often VAR or LET and CONST?? I Have VAR is no longer used is it true??
Как сравнивать строки в Phyton?
Kotlin get if Var doesn't exist