0

I'm working on javascript about a week, and I noticed that Visual Studio don't flag you a function if you don't end it with a semicolon:

function secondalert(){
alert ("Hi")
}

secondalert();

So as you can see i don't end the function with any semicolon, but Visual Studio, like any other text editor, don't flag it.

Is it wrong to don't end a function? And if semicolon is necessary, is it better if I put it after the curly brace?

0 Answers0