[{"data":1,"prerenderedAt":302},["ShallowReactive",2],{"term-u\u002Fundefined":3,"related-u\u002Fundefined":283},{"id":4,"title":5,"acronym":6,"body":7,"category":264,"description":265,"difficulty":266,"extension":267,"letter":268,"meta":269,"navigation":93,"path":270,"related":271,"seo":277,"sitemap":278,"stem":281,"subcategory":6,"__hash__":282},"terms\u002Fterms\u002Fu\u002Fundefined.md","Undefined",null,{"type":8,"value":9,"toc":258},"minimark",[10,15,19,23,26,30,247,251,254],[11,12,14],"h2",{"id":13},"eli5-the-vibe-check","ELI5 — The Vibe Check",[16,17,18],"p",{},"Undefined in JavaScript means a variable exists but has never been given a value. It is like a labeled empty box — the box is there, but nobody put anything in it. Null is 'empty on purpose'; undefined is 'empty because nobody got around to filling it yet'.",[11,20,22],{"id":21},"real-talk","Real Talk",[16,24,25],{},"Undefined is a primitive value in JavaScript indicating a variable that has been declared but not yet assigned. It also occurs when accessing non-existent object properties, function parameters not passed by the caller, and functions that return nothing. It is distinct from null (intentional absence). TypeScript can catch many undefined-related bugs at compile time through strict null checks.",[11,27,29],{"id":28},"show-me-the-code","Show Me The Code",[31,32,37],"pre",{"className":33,"code":34,"language":35,"meta":36,"style":36},"language-javascript shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","\u002F\u002F How undefined appears:\nlet x;                    \u002F\u002F declared but not assigned\nconsole.log(x);           \u002F\u002F undefined\n\nconst obj = { name: 'Alice' };\nconsole.log(obj.age);     \u002F\u002F undefined — property doesn't exist\n\nfunction greet(name) {\n  console.log(name);      \u002F\u002F undefined if called as greet()\n}\n\n\u002F\u002F Guard against undefined:\nconst age = obj.age ?? 18; \u002F\u002F default if null or undefined\n","javascript","",[38,39,40,49,67,88,95,130,152,157,179,200,206,211,217],"code",{"__ignoreMap":36},[41,42,45],"span",{"class":43,"line":44},"line",1,[41,46,48],{"class":47},"sHwdD","\u002F\u002F How undefined appears:\n",[41,50,52,56,60,64],{"class":43,"line":51},2,[41,53,55],{"class":54},"spNyl","let",[41,57,59],{"class":58},"sTEyZ"," x",[41,61,63],{"class":62},"sMK4o",";",[41,65,66],{"class":47},"                    \u002F\u002F declared but not assigned\n",[41,68,70,73,76,80,83,85],{"class":43,"line":69},3,[41,71,72],{"class":58},"console",[41,74,75],{"class":62},".",[41,77,79],{"class":78},"s2Zo4","log",[41,81,82],{"class":58},"(x)",[41,84,63],{"class":62},[41,86,87],{"class":47},"           \u002F\u002F undefined\n",[41,89,91],{"class":43,"line":90},4,[41,92,94],{"emptyLinePlaceholder":93},true,"\n",[41,96,98,101,104,107,110,114,117,120,124,127],{"class":43,"line":97},5,[41,99,100],{"class":54},"const",[41,102,103],{"class":58}," obj ",[41,105,106],{"class":62},"=",[41,108,109],{"class":62}," {",[41,111,113],{"class":112},"swJcz"," name",[41,115,116],{"class":62},":",[41,118,119],{"class":62}," '",[41,121,123],{"class":122},"sfazB","Alice",[41,125,126],{"class":62},"'",[41,128,129],{"class":62}," };\n",[41,131,133,135,137,139,142,144,147,149],{"class":43,"line":132},6,[41,134,72],{"class":58},[41,136,75],{"class":62},[41,138,79],{"class":78},[41,140,141],{"class":58},"(obj",[41,143,75],{"class":62},[41,145,146],{"class":58},"age)",[41,148,63],{"class":62},[41,150,151],{"class":47},"     \u002F\u002F undefined — property doesn't exist\n",[41,153,155],{"class":43,"line":154},7,[41,156,94],{"emptyLinePlaceholder":93},[41,158,160,163,166,169,173,176],{"class":43,"line":159},8,[41,161,162],{"class":54},"function",[41,164,165],{"class":78}," greet",[41,167,168],{"class":62},"(",[41,170,172],{"class":171},"sHdIc","name",[41,174,175],{"class":62},")",[41,177,178],{"class":62}," {\n",[41,180,182,185,187,189,191,193,195,197],{"class":43,"line":181},9,[41,183,184],{"class":58},"  console",[41,186,75],{"class":62},[41,188,79],{"class":78},[41,190,168],{"class":112},[41,192,172],{"class":58},[41,194,175],{"class":112},[41,196,63],{"class":62},[41,198,199],{"class":47},"      \u002F\u002F undefined if called as greet()\n",[41,201,203],{"class":43,"line":202},10,[41,204,205],{"class":62},"}\n",[41,207,209],{"class":43,"line":208},11,[41,210,94],{"emptyLinePlaceholder":93},[41,212,214],{"class":43,"line":213},12,[41,215,216],{"class":47},"\u002F\u002F Guard against undefined:\n",[41,218,220,222,225,227,230,232,235,238,242,244],{"class":43,"line":219},13,[41,221,100],{"class":54},[41,223,224],{"class":58}," age ",[41,226,106],{"class":62},[41,228,229],{"class":58}," obj",[41,231,75],{"class":62},[41,233,234],{"class":58},"age ",[41,236,237],{"class":62},"??",[41,239,241],{"class":240},"sbssI"," 18",[41,243,63],{"class":62},[41,245,246],{"class":47}," \u002F\u002F default if null or undefined\n",[11,248,250],{"id":249},"when-youll-hear-this","When You'll Hear This",[16,252,253],{},"\"You're accessing a property that's undefined — check the object shape.\" \u002F \"TypeScript's strict mode catches undefined access before runtime.\"",[255,256,257],"style",{},"html pre.shiki code .sHwdD, html code.shiki .sHwdD{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#546E7A;--shiki-default-font-style:italic;--shiki-dark:#676E95;--shiki-dark-font-style:italic}html pre.shiki code .spNyl, html code.shiki .spNyl{--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA}html pre.shiki code .sTEyZ, html code.shiki .sTEyZ{--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8}html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html pre.shiki code .s2Zo4, html code.shiki .s2Zo4{--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF}html pre.shiki code .swJcz, html code.shiki .swJcz{--shiki-light:#E53935;--shiki-default:#F07178;--shiki-dark:#F07178}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}html pre.shiki code .sHdIc, html code.shiki .sHdIc{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#EEFFFF;--shiki-default-font-style:italic;--shiki-dark:#BABED8;--shiki-dark-font-style:italic}html pre.shiki code .sbssI, html code.shiki .sbssI{--shiki-light:#F76D47;--shiki-default:#F78C6C;--shiki-dark:#F78C6C}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":36,"searchDepth":51,"depth":51,"links":259},[260,261,262,263],{"id":13,"depth":51,"text":14},{"id":21,"depth":51,"text":22},{"id":28,"depth":51,"text":29},{"id":249,"depth":51,"text":250},"general","Undefined in JavaScript means a variable exists but has never been given a value.","beginner","md","u",{},"\u002Fterms\u002Fu\u002Fundefined",[272,273,274,275,276],"Null","NaN","Type","Runtime Error","TypeScript",{"title":5,"description":265},{"changefreq":279,"priority":280},"weekly",0.7,"terms\u002Fu\u002Fundefined","LKliemfEw9dVHLJg6UK4aU-BKpsk0UECUHCg9FDWoZI",[284,288,291,294,297],{"title":273,"path":285,"acronym":286,"category":264,"difficulty":266,"description":287},"\u002Fterms\u002Fn\u002Fnan","Not a Number","NaN means 'Not a Number' — it is what JavaScript gives you when math goes wrong in a weird way. Try to parse a word as a number and you get NaN.",{"title":272,"path":289,"acronym":6,"category":264,"difficulty":266,"description":290},"\u002Fterms\u002Fn\u002Fnull","Null means 'intentionally nothing' — a programmer chose to say 'there is no value here'. It is a deliberate absence.",{"title":275,"path":292,"acronym":6,"category":264,"difficulty":266,"description":293},"\u002Fterms\u002Fr\u002Fruntime-error","A runtime error is one that only shows up when your program is actually running, not before.",{"title":274,"path":295,"acronym":6,"category":264,"difficulty":266,"description":296},"\u002Fterms\u002Ft\u002Ftype","A type tells the computer what kind of thing a value is — is it a number, text, true\u002Ffalse, or a list?",{"title":276,"path":298,"acronym":6,"category":299,"difficulty":300,"description":301},"\u002Fterms\u002Ft\u002Ftypescript","frontend","intermediate","TypeScript is JavaScript with a strict parent watching over it.",1776518321040]