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 trialAlex England
14,602 PointsShouldnt there be a ; at then end of the promise chain?
I noticed in Guil's code there isn't a semi colon at the end of the catch/finally statements. Should there be?
2 Answers
kevin curtis
15,287 PointsNo, in fact, using es2015 onwards you don't actually need to include a semicolon at the end of any of your lines of code in JavaScript. However there are some guidelines worth observing. Take a look at this article: https://medium.com/@thakkery/a-practical-style-guide-to-semi-colons-in-es6-c4f63d03a904
Daniel Ahn
Front End Web Development Techdegree Student 8,575 PointsI think the correct answer is yes, it should, if you are typically ending all your relevant lines with a ;.
But as Kevin said, it's not mandatory. It's more of a stylistic choice I guess.
Alex England
14,602 PointsAlex England
14,602 PointsThanks!