[{"data":1,"prerenderedAt":248},["ShallowReactive",2],{"term-s\u002Fsyntax-error":3,"related-s\u002Fsyntax-error":231},{"id":4,"title":5,"acronym":6,"body":7,"category":212,"description":213,"difficulty":214,"extension":215,"letter":216,"meta":217,"navigation":54,"path":218,"related":219,"seo":225,"sitemap":226,"stem":229,"subcategory":6,"__hash__":230},"terms\u002Fterms\u002Fs\u002Fsyntax-error.md","Syntax Error",null,{"type":8,"value":9,"toc":206},"minimark",[10,15,19,23,26,30,195,199,202],[11,12,14],"h2",{"id":13},"eli5-the-vibe-check","ELI5 — The Vibe Check",[16,17,18],"p",{},"A syntax error is when you write code that the computer cannot even understand — like handing someone a sentence with no verbs. It is caught before the program even runs. The good news: syntax errors are the easiest to fix because the editor usually shows you exactly where you messed up.",[11,20,22],{"id":21},"real-talk","Real Talk",[16,24,25],{},"A syntax error occurs when source code violates the grammatical rules of the programming language and cannot be parsed. The compiler or interpreter rejects the code entirely before execution begins. Modern editors with LSP support highlight syntax errors in real time. Common causes include missing brackets, unclosed strings, wrong keywords, and invalid punctuation.",[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 SyntaxError examples:\n\n\u002F\u002F Missing closing bracket:\nfunction greet(name {\n  return `Hello ${name}`;\n}\n\u002F\u002F SyntaxError: Unexpected token '{'\n\n\u002F\u002F Unclosed string:\nconst msg = \"Hello world;\n\u002F\u002F SyntaxError: Invalid or unexpected token\n\n\u002F\u002F Using a reserved word:\nconst class = 'myClass'; \u002F\u002F 'class' is reserved\n","javascript","",[38,39,40,49,56,62,84,111,117,123,128,134,153,159,164,170],"code",{"__ignoreMap":36},[41,42,45],"span",{"class":43,"line":44},"line",1,[41,46,48],{"class":47},"sHwdD","\u002F\u002F SyntaxError examples:\n",[41,50,52],{"class":43,"line":51},2,[41,53,55],{"emptyLinePlaceholder":54},true,"\n",[41,57,59],{"class":43,"line":58},3,[41,60,61],{"class":47},"\u002F\u002F Missing closing bracket:\n",[41,63,65,69,73,77,81],{"class":43,"line":64},4,[41,66,68],{"class":67},"spNyl","function",[41,70,72],{"class":71},"s2Zo4"," greet",[41,74,76],{"class":75},"sMK4o","(",[41,78,80],{"class":79},"sHdIc","name",[41,82,83],{"class":75}," {\n",[41,85,87,90,94,97,100,103,105,108],{"class":43,"line":86},5,[41,88,89],{"class":79},"  return",[41,91,93],{"class":92},"sTEyZ"," `",[41,95,96],{"class":79},"Hello",[41,98,99],{"class":79}," $",[41,101,102],{"class":75},"{",[41,104,80],{"class":79},[41,106,107],{"class":75},"}",[41,109,110],{"class":92},"`;\n",[41,112,114],{"class":43,"line":113},6,[41,115,116],{"class":75},"}\n",[41,118,120],{"class":43,"line":119},7,[41,121,122],{"class":47},"\u002F\u002F SyntaxError: Unexpected token '{'\n",[41,124,126],{"class":43,"line":125},8,[41,127,55],{"emptyLinePlaceholder":54},[41,129,131],{"class":43,"line":130},9,[41,132,133],{"class":47},"\u002F\u002F Unclosed string:\n",[41,135,137,140,143,146,149],{"class":43,"line":136},10,[41,138,139],{"class":79},"const",[41,141,142],{"class":79}," msg",[41,144,145],{"class":75}," =",[41,147,148],{"class":75}," \"",[41,150,152],{"class":151},"sfazB","Hello world;\n",[41,154,156],{"class":43,"line":155},11,[41,157,158],{"class":47},"\u002F\u002F SyntaxError: Invalid or unexpected token\n",[41,160,162],{"class":43,"line":161},12,[41,163,55],{"emptyLinePlaceholder":54},[41,165,167],{"class":43,"line":166},13,[41,168,169],{"class":47},"\u002F\u002F Using a reserved word:\n",[41,171,173,175,178,180,183,186,189,192],{"class":43,"line":172},14,[41,174,139],{"class":79},[41,176,177],{"class":79}," class",[41,179,145],{"class":75},[41,181,182],{"class":75}," '",[41,184,185],{"class":151},"myClass",[41,187,188],{"class":75},"'",[41,190,191],{"class":92},"; ",[41,193,194],{"class":47},"\u002F\u002F 'class' is reserved\n",[11,196,198],{"id":197},"when-youll-hear-this","When You'll Hear This",[16,200,201],{},"\"It's just a syntax error — missing a comma.\" \u002F \"TypeScript catches syntax errors before you even run the code.\"",[203,204,205],"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 .s2Zo4, html code.shiki .s2Zo4{--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF}html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}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 .sTEyZ, html code.shiki .sTEyZ{--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}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":207},[208,209,210,211],{"id":13,"depth":51,"text":14},{"id":21,"depth":51,"text":22},{"id":28,"depth":51,"text":29},{"id":197,"depth":51,"text":198},"general","A syntax error is when you write code that the computer cannot even understand — like handing someone a sentence with no verbs.","beginner","md","s",{},"\u002Fterms\u002Fs\u002Fsyntax-error",[220,221,222,223,224],"Syntax","Runtime Error","Logic Error","Compiler","Bug",{"title":5,"description":213},{"changefreq":227,"priority":228},"weekly",0.7,"terms\u002Fs\u002Fsyntax-error","LuZKawIl-50ST2T7LRqvNovqiglcpJXEwPGwiDF537M",[232,235,239,242,245],{"title":224,"path":233,"acronym":6,"category":212,"difficulty":214,"description":234},"\u002Fterms\u002Fb\u002Fbug","A bug is anything in your code that makes it behave wrong.",{"title":223,"path":236,"acronym":6,"category":212,"difficulty":237,"description":238},"\u002Fterms\u002Fc\u002Fcompiler","intermediate","A compiler is like a translator that reads your entire code book, converts it all into a language the CPU understands, and hands you the finished translate...",{"title":222,"path":240,"acronym":6,"category":212,"difficulty":214,"description":241},"\u002Fterms\u002Fl\u002Flogic-error","A logic error is the sneakiest kind of bug — the code runs perfectly fine, no crashes, no errors, but it does the WRONG thing.",{"title":221,"path":243,"acronym":6,"category":212,"difficulty":214,"description":244},"\u002Fterms\u002Fr\u002Fruntime-error","A runtime error is one that only shows up when your program is actually running, not before.",{"title":220,"path":246,"acronym":6,"category":212,"difficulty":214,"description":247},"\u002Fterms\u002Fs\u002Fsyntax","Syntax is the grammar rules of a programming language — where to put the curly braces, where to put semicolons, how to write a function.",1776518317015]