Les 3: Intro to Functions:: Why no Semi-Colon at the end of a function?


#1


https://www.codecademy.com/en/courses/javascript-beginner-en-6LzGd/0/4?curriculum_id=506324b3a7dffd00020bf661


I added a semi-colon at the end of the orange food on the first line and it gave me an error. Deleted and it was fixed. I thought a semi-colon was standard for everything like this.


Replace this line with your code.


#2

The semicolon in JavaScript is used to separate statements, you don't want to separate your function declaration from your function content? That doesn't make much sense


#3

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.