[Javascript] line end character ;

Hakan Magnusson hakan at backbase.com
Wed Jun 23 10:19:55 CDT 2004


The way I see it, the only reason not to supply a semicolon at the end 
of each statement in JavaScript is being lazy, and being lazy is not a 
valid reason. There's absolutely NO advantages with omitting it, only 
possible breakdowns in a number of situations.

Mark Wonsil wrote:
> For as long as I have been coding, it has been taught to not rely on default
> behaviors.  The world changes and your code will break at some point.  Be
> explicit as much as you can.

Amen. Print, frame, put on the wall next to your monitor.

Regards,
H



More information about the Javascript mailing list