[{"data":1,"prerenderedAt":222},["ShallowReactive",2],{"term-s\u002Fsyntax":3,"related-s\u002Fsyntax":208},{"id":4,"title":5,"acronym":6,"body":7,"category":189,"description":190,"difficulty":191,"extension":192,"letter":193,"meta":194,"navigation":106,"path":195,"related":196,"seo":202,"sitemap":203,"stem":206,"subcategory":6,"__hash__":207},"terms\u002Fterms\u002Fs\u002Fsyntax.md","Syntax",null,{"type":8,"value":9,"toc":183},"minimark",[10,15,19,23,26,30,172,176,179],[11,12,14],"h2",{"id":13},"eli5-the-vibe-check","ELI5 — The Vibe Check",[16,17,18],"p",{},"Syntax is the grammar rules of a programming language — where to put the curly braces, where to put semicolons, how to write a function. Break the grammar rules and the computer has no idea what you are saying. Every language has its own syntax, just like human languages have their own grammar.",[11,20,22],{"id":21},"real-talk","Real Talk",[16,24,25],{},"Syntax refers to the formal rules that define the structure of valid statements in a programming language. Syntax is enforced by the parser\u002Fcompiler before execution. Unlike natural language where context can fix mistakes, a single missing bracket or wrong keyword causes a SyntaxError that prevents the program from running at all.",[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 Valid JavaScript syntax:\nconst greet = (name) => `Hello, ${name}!`;\n\n\u002F\u002F Syntax error — missing closing bracket:\n\u002F\u002F const greet = (name => `Hello, ${name}!`;\n\u002F\u002F   SyntaxError: Unexpected token\n\n\u002F\u002F Python syntax is totally different:\n# def greet(name):\n#     return f\"Hello, {name}!\"\n","javascript","",[38,39,40,49,101,108,114,120,126,131,137,150],"code",{"__ignoreMap":36},[41,42,45],"span",{"class":43,"line":44},"line",1,[41,46,48],{"class":47},"sHwdD","\u002F\u002F Valid JavaScript syntax:\n",[41,50,52,56,60,64,67,71,74,77,80,84,87,89,92,95,98],{"class":43,"line":51},2,[41,53,55],{"class":54},"spNyl","const",[41,57,59],{"class":58},"sTEyZ"," greet ",[41,61,63],{"class":62},"sMK4o","=",[41,65,66],{"class":62}," (",[41,68,70],{"class":69},"sHdIc","name",[41,72,73],{"class":62},")",[41,75,76],{"class":54}," =>",[41,78,79],{"class":62}," `",[41,81,83],{"class":82},"sfazB","Hello, ",[41,85,86],{"class":62},"${",[41,88,70],{"class":58},[41,90,91],{"class":62},"}",[41,93,94],{"class":82},"!",[41,96,97],{"class":62},"`",[41,99,100],{"class":62},";\n",[41,102,104],{"class":43,"line":103},3,[41,105,107],{"emptyLinePlaceholder":106},true,"\n",[41,109,111],{"class":43,"line":110},4,[41,112,113],{"class":47},"\u002F\u002F Syntax error — missing closing bracket:\n",[41,115,117],{"class":43,"line":116},5,[41,118,119],{"class":47},"\u002F\u002F const greet = (name => `Hello, ${name}!`;\n",[41,121,123],{"class":43,"line":122},6,[41,124,125],{"class":47},"\u002F\u002F   SyntaxError: Unexpected token\n",[41,127,129],{"class":43,"line":128},7,[41,130,107],{"emptyLinePlaceholder":106},[41,132,134],{"class":43,"line":133},8,[41,135,136],{"class":47},"\u002F\u002F Python syntax is totally different:\n",[41,138,140,143,147],{"class":43,"line":139},9,[41,141,142],{"class":58},"# def ",[41,144,146],{"class":145},"s2Zo4","greet",[41,148,149],{"class":58},"(name):\n",[41,151,153,156,160,163,166,169],{"class":43,"line":152},10,[41,154,155],{"class":58},"#     ",[41,157,159],{"class":158},"s7zQu","return",[41,161,162],{"class":58}," f",[41,164,165],{"class":62},"\"",[41,167,168],{"class":82},"Hello, {name}!",[41,170,171],{"class":62},"\"\n",[11,173,175],{"id":174},"when-youll-hear-this","When You'll Hear This",[16,177,178],{},"\"That's a syntax error — you forgot the closing bracket.\" \u002F \"Python and JavaScript have very different syntax.\"",[180,181,182],"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 .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 .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}html pre.shiki code .s2Zo4, html code.shiki .s2Zo4{--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF}html pre.shiki code .s7zQu, html code.shiki .s7zQu{--shiki-light:#39ADB5;--shiki-light-font-style:italic;--shiki-default:#89DDFF;--shiki-default-font-style:italic;--shiki-dark:#89DDFF;--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":36,"searchDepth":51,"depth":51,"links":184},[185,186,187,188],{"id":13,"depth":51,"text":14},{"id":21,"depth":51,"text":22},{"id":28,"depth":51,"text":29},{"id":174,"depth":51,"text":175},"general","Syntax is the grammar rules of a programming language — where to put the curly braces, where to put semicolons, how to write a function.","beginner","md","s",{},"\u002Fterms\u002Fs\u002Fsyntax",[197,198,199,200,201],"Syntax Error","Compiler","Interpreter","Parser","Code Editor",{"title":5,"description":190},{"changefreq":204,"priority":205},"weekly",0.7,"terms\u002Fs\u002Fsyntax","3EIaUPjA1fQnzRnLbRADk2w2Svsjq915Wq8cTTlwww0",[209,212,216,219],{"title":201,"path":210,"acronym":6,"category":189,"difficulty":191,"description":211},"\u002Fterms\u002Fc\u002Fcode-editor","A code editor is like a word processor but for code — it makes text look pretty with colors and helps you type faster.",{"title":198,"path":213,"acronym":6,"category":189,"difficulty":214,"description":215},"\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":199,"path":217,"acronym":6,"category":189,"difficulty":214,"description":218},"\u002Fterms\u002Fi\u002Finterpreter","An interpreter reads your code and runs it line by line in real time, like a live translator at a conference.",{"title":197,"path":220,"acronym":6,"category":189,"difficulty":191,"description":221},"\u002Fterms\u002Fs\u002Fsyntax-error","A syntax error is when you write code that the computer cannot even understand — like handing someone a sentence with no verbs.",1776518316991]