Possible Duplicates:
do we need semicolon at the end
Why use semicolon?
Are semicolons needed after an object literal assignment in JavaScript?
Should I use semicolons in JavaScript?
should I use semicolon at end of line when coding JavaScript?
Enforce semicolons in my Javascript?
What are the rules for JavaScript's automatic semicolon insertion (ASI)?
I've heard Javascript inserts ";" automatically and that may cause problems
Do you recommend using semicolons after every statement in JavaScript?
Why should I use a semicolon after every function in javascript?
Why is a semicolon required at end of line?
This was a strange issue I faced once I was coding.
Consider the following:
function foo()
{
alert("This does not have a semi-colon and works in Chrome but not in IE")
}
and
function foo1()
{
alert("This has a semi-colon and works everywhere");
}
Why does this happen?