[{"data":1,"prerenderedAt":301},["ShallowReactive",2],{"term-t\u002Ftype":3,"related-t\u002Ftype":280},{"id":4,"title":5,"acronym":6,"body":7,"category":260,"description":261,"difficulty":262,"extension":263,"letter":264,"meta":265,"navigation":167,"path":266,"related":267,"seo":274,"sitemap":275,"stem":278,"subcategory":6,"__hash__":279},"terms\u002Fterms\u002Ft\u002Ftype.md","Type",null,{"type":8,"value":9,"toc":254},"minimark",[10,15,19,23,26,30,243,247,250],[11,12,14],"h2",{"id":13},"eli5-the-vibe-check","ELI5 — The Vibe Check",[16,17,18],"p",{},"A type tells the computer what kind of thing a value is — is it a number, text, true\u002Ffalse, or a list? Types matter because you cannot add a number to a word (well, JavaScript will try anyway). Types help the computer know what operations make sense on a value.",[11,20,22],{"id":21},"real-talk","Real Talk",[16,24,25],{},"A type (or data type) is a classification that specifies what kind of value a variable holds and what operations can be performed on it. Primitive types (number, string, boolean, null, undefined) hold simple values directly. Reference types (object, array, function) hold a pointer to a memory location. Languages enforce types either at compile time (static typing) or at runtime (dynamic typing).",[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 JavaScript types (dynamic — determined at runtime):\ntypeof 42;          \u002F\u002F 'number'\ntypeof 'hello';     \u002F\u002F 'string'\ntypeof true;        \u002F\u002F 'boolean'\ntypeof null;        \u002F\u002F 'object' (famous JS bug!)\ntypeof undefined;   \u002F\u002F 'undefined'\ntypeof {};          \u002F\u002F 'object'\ntypeof [];          \u002F\u002F 'object' (arrays are objects in JS)\ntypeof function(){}; \u002F\u002F 'function'\n\n\u002F\u002F TypeScript types (static — checked at compile time):\nconst age: number = 25;\nconst name: string = 'Alice';\nconst active: boolean = true;\n","javascript","",[38,39,40,49,66,86,100,111,122,133,147,162,169,175,200,224],"code",{"__ignoreMap":36},[41,42,45],"span",{"class":43,"line":44},"line",1,[41,46,48],{"class":47},"sHwdD","\u002F\u002F JavaScript types (dynamic — determined at runtime):\n",[41,50,52,56,60,63],{"class":43,"line":51},2,[41,53,55],{"class":54},"sMK4o","typeof",[41,57,59],{"class":58},"sbssI"," 42",[41,61,62],{"class":54},";",[41,64,65],{"class":47},"          \u002F\u002F 'number'\n",[41,67,69,71,74,78,81,83],{"class":43,"line":68},3,[41,70,55],{"class":54},[41,72,73],{"class":54}," '",[41,75,77],{"class":76},"sfazB","hello",[41,79,80],{"class":54},"'",[41,82,62],{"class":54},[41,84,85],{"class":47},"     \u002F\u002F 'string'\n",[41,87,89,91,95,97],{"class":43,"line":88},4,[41,90,55],{"class":54},[41,92,94],{"class":93},"sfNiH"," true",[41,96,62],{"class":54},[41,98,99],{"class":47},"        \u002F\u002F 'boolean'\n",[41,101,103,105,108],{"class":43,"line":102},5,[41,104,55],{"class":54},[41,106,107],{"class":54}," null;",[41,109,110],{"class":47},"        \u002F\u002F 'object' (famous JS bug!)\n",[41,112,114,116,119],{"class":43,"line":113},6,[41,115,55],{"class":54},[41,117,118],{"class":54}," undefined;",[41,120,121],{"class":47},"   \u002F\u002F 'undefined'\n",[41,123,125,127,130],{"class":43,"line":124},7,[41,126,55],{"class":54},[41,128,129],{"class":54}," {};",[41,131,132],{"class":47},"          \u002F\u002F 'object'\n",[41,134,136,138,142,144],{"class":43,"line":135},8,[41,137,55],{"class":54},[41,139,141],{"class":140},"sTEyZ"," []",[41,143,62],{"class":54},[41,145,146],{"class":47},"          \u002F\u002F 'object' (arrays are objects in JS)\n",[41,148,150,152,156,159],{"class":43,"line":149},9,[41,151,55],{"class":54},[41,153,155],{"class":154},"spNyl"," function",[41,157,158],{"class":54},"(){};",[41,160,161],{"class":47}," \u002F\u002F 'function'\n",[41,163,165],{"class":43,"line":164},10,[41,166,168],{"emptyLinePlaceholder":167},true,"\n",[41,170,172],{"class":43,"line":171},11,[41,173,174],{"class":47},"\u002F\u002F TypeScript types (static — checked at compile time):\n",[41,176,178,181,184,187,191,194,197],{"class":43,"line":177},12,[41,179,180],{"class":154},"const",[41,182,183],{"class":140}," age",[41,185,186],{"class":54},":",[41,188,190],{"class":189},"sBMFI"," number",[41,192,193],{"class":54}," =",[41,195,196],{"class":58}," 25",[41,198,199],{"class":54},";\n",[41,201,203,205,208,210,213,215,217,220,222],{"class":43,"line":202},13,[41,204,180],{"class":154},[41,206,207],{"class":140}," name",[41,209,186],{"class":54},[41,211,212],{"class":189}," string",[41,214,193],{"class":54},[41,216,73],{"class":54},[41,218,219],{"class":76},"Alice",[41,221,80],{"class":54},[41,223,199],{"class":54},[41,225,227,229,232,234,237,239,241],{"class":43,"line":226},14,[41,228,180],{"class":154},[41,230,231],{"class":140}," active",[41,233,186],{"class":54},[41,235,236],{"class":189}," boolean",[41,238,193],{"class":54},[41,240,94],{"class":93},[41,242,199],{"class":54},[11,244,246],{"id":245},"when-youll-hear-this","When You'll Hear This",[16,248,249],{},"\"What type does that function return?\" \u002F \"Type errors at compile time are way better than at runtime.\"",[251,252,253],"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 .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html pre.shiki code .sbssI, html code.shiki .sbssI{--shiki-light:#F76D47;--shiki-default:#F78C6C;--shiki-dark:#F78C6C}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}html pre.shiki code .sfNiH, html code.shiki .sfNiH{--shiki-light:#FF5370;--shiki-default:#FF9CAC;--shiki-dark:#FF9CAC}html pre.shiki code .sTEyZ, html code.shiki .sTEyZ{--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8}html pre.shiki code .spNyl, html code.shiki .spNyl{--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA}html pre.shiki code .sBMFI, html code.shiki .sBMFI{--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B}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":255},[256,257,258,259],{"id":13,"depth":51,"text":14},{"id":21,"depth":51,"text":22},{"id":28,"depth":51,"text":29},{"id":245,"depth":51,"text":246},"general","A type tells the computer what kind of thing a value is — is it a number, text, true\u002Ffalse, or a list?","beginner","md","t",{},"\u002Fterms\u002Ft\u002Ftype",[268,269,270,271,272,273],"Static Typing","Boolean","Integer","Float","String","TypeScript",{"title":5,"description":261},{"changefreq":276,"priority":277},"weekly",0.7,"terms\u002Ft\u002Ftype","TUY4pG8M7ZXf6te_3NqBWpIkB70cTdo7WjpSL9ImKUo",[281,284,287,290,294,297],{"title":269,"path":282,"acronym":6,"category":260,"difficulty":262,"description":283},"\u002Fterms\u002Fb\u002Fboolean","A boolean is the simplest value in programming — it is either true or false. On or off. Yes or no. 1 or 0. Named after mathematician George Boole.",{"title":271,"path":285,"acronym":6,"category":260,"difficulty":262,"description":286},"\u002Fterms\u002Ff\u002Ffloat","A float is a number with a decimal point — 3.14, 1.5, -0.001. The name comes from 'floating point' because the decimal point can be anywhere.",{"title":270,"path":288,"acronym":6,"category":260,"difficulty":262,"description":289},"\u002Fterms\u002Fi\u002Finteger","An integer is a whole number — no decimal point. 1, 42, -7, 1000 are integers. 1.5 is NOT an integer, that is a float.",{"title":268,"path":291,"acronym":6,"category":260,"difficulty":292,"description":293},"\u002Fterms\u002Fs\u002Fstatic-typing","intermediate","Static typing means you have to tell the computer what type each variable is when you write the code, and it checks everything is correct BEFORE running.",{"title":272,"path":295,"acronym":6,"category":260,"difficulty":262,"description":296},"\u002Fterms\u002Fs\u002Fstring","A string is text in programming — any sequence of characters wrapped in quotes. 'Hello', 'user@email.com', '12345' — if it is in quotes, it is a string.",{"title":273,"path":298,"acronym":6,"category":299,"difficulty":292,"description":300},"\u002Fterms\u002Ft\u002Ftypescript","frontend","TypeScript is JavaScript with a strict parent watching over it.",1776518320437]