[{"data":1,"prerenderedAt":163},["ShallowReactive",2],{"term-c\u002Fconstant":3,"related-c\u002Fconstant":149},{"id":4,"title":5,"acronym":6,"body":7,"category":131,"description":132,"difficulty":133,"extension":134,"letter":135,"meta":136,"navigation":102,"path":137,"related":138,"seo":143,"sitemap":144,"stem":147,"subcategory":6,"__hash__":148},"terms\u002Fterms\u002Fc\u002Fconstant.md","Constant",null,{"type":8,"value":9,"toc":125},"minimark",[10,15,19,23,39,43,114,118,121],[11,12,14],"h2",{"id":13},"eli5-the-vibe-check","ELI5 — The Vibe Check",[16,17,18],"p",{},"A constant is a box you seal shut after putting something in. You can look inside any time you want, but you can't swap out what's in there. It's perfect for things that should never change, like the number of days in a week.",[11,20,22],{"id":21},"real-talk","Real Talk",[16,24,25,26,30,31,34,35,38],{},"A constant is an immutable variable — its value is set once and cannot be reassigned. Constants communicate intent to other developers and prevent accidental mutations. They are declared with ",[27,28,29],"code",{},"const"," in JS\u002FTS, ",[27,32,33],{},"final"," in Java, or ",[27,36,37],{},"let"," in Rust.",[11,40,42],{"id":41},"show-me-the-code","Show Me The Code",[44,45,50],"pre",{"className":46,"code":47,"language":48,"meta":49,"style":49},"language-javascript shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","const MAX_RETRIES = 3;\nconst API_BASE_URL = \"https:\u002F\u002Fapi.example.com\";\n\n\u002F\u002F MAX_RETRIES = 5; \u002F\u002F TypeError: Assignment to constant variable\n","javascript","",[27,51,52,75,97,104],{"__ignoreMap":49},[53,54,57,60,64,68,72],"span",{"class":55,"line":56},"line",1,[53,58,29],{"class":59},"spNyl",[53,61,63],{"class":62},"sTEyZ"," MAX_RETRIES ",[53,65,67],{"class":66},"sMK4o","=",[53,69,71],{"class":70},"sbssI"," 3",[53,73,74],{"class":66},";\n",[53,76,78,80,83,85,88,92,95],{"class":55,"line":77},2,[53,79,29],{"class":59},[53,81,82],{"class":62}," API_BASE_URL ",[53,84,67],{"class":66},[53,86,87],{"class":66}," \"",[53,89,91],{"class":90},"sfazB","https:\u002F\u002Fapi.example.com",[53,93,94],{"class":66},"\"",[53,96,74],{"class":66},[53,98,100],{"class":55,"line":99},3,[53,101,103],{"emptyLinePlaceholder":102},true,"\n",[53,105,107,111],{"class":55,"line":106},4,[53,108,110],{"class":109},"sHwdD","\u002F\u002F MAX_RETRIES = 5;",[53,112,113],{"class":109}," \u002F\u002F TypeError: Assignment to constant variable\n",[11,115,117],{"id":116},"when-youll-hear-this","When You'll Hear This",[16,119,120],{},"\"Put that magic number in a constant with a good name.\" \u002F \"Never hardcode values — use constants.\"",[122,123,124],"style",{},"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 .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 .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 .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":49,"searchDepth":77,"depth":77,"links":126},[127,128,129,130],{"id":13,"depth":77,"text":14},{"id":21,"depth":77,"text":22},{"id":41,"depth":77,"text":42},{"id":116,"depth":77,"text":117},"general","A constant is a box you seal shut after putting something in. You can look inside any time you want, but you can't swap out what's in there.","beginner","md","c",{},"\u002Fterms\u002Fc\u002Fconstant",[139,140,141,142],"Variable","Enum","Boilerplate","Pure Function",{"title":5,"description":132},{"changefreq":145,"priority":146},"weekly",0.7,"terms\u002Fc\u002Fconstant","UehcAvzdRG32wth66NSgutrAxs87yrex8deaWxSOjOM",[150,153,156,160],{"title":141,"path":151,"acronym":6,"category":131,"difficulty":133,"description":152},"\u002Fterms\u002Fb\u002Fboilerplate","Code you have to write every single time you start a project but that doesn't actually do anything interesting.",{"title":140,"path":154,"acronym":6,"category":131,"difficulty":133,"description":155},"\u002Fterms\u002Fe\u002Fenum","An enum is a named list of options that are all related.",{"title":142,"path":157,"acronym":6,"category":131,"difficulty":158,"description":159},"\u002Fterms\u002Fp\u002Fpure-function","intermediate","A pure function is the well-behaved kid of programming.",{"title":139,"path":161,"acronym":6,"category":131,"difficulty":133,"description":162},"\u002Fterms\u002Fv\u002Fvariable","A variable is a named box where you store information.",1776518268872]