Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialAgustin Hernandez
2,747 PointsJavaScript Semi-colon?
I have barley started learning JavaScript and while in the first section of the JS Basics course it talks about Syntax errors so I went on and wrote a statement without the semi-colon to see if it returns a Syntax error rather than throwing out an error the program executed right without errors by the JavaScript interpreter. So my question is how did the program run without causing an error?
1 Answer
Ruben Ponce
Full Stack JavaScript Techdegree Student 12,035 PointsThat's a feature of ES6. It'll automatically include semicolons, so you can focus on actual syntax errors like misspellings and bad data types. https://dev.to/promhize/what-you-need-to-know-about-javascripts-automatic-semi-colon-insertion-78a