You are here: irt.org | FAQ | JavaScript | General | Q615 [ previous next ]
Semi-colons are optional. However, if you join two statements onto one line then you'll need a spearating semi-colon:
var x = 1; x = x + 1;
Which is the same as:
var x = 1 x = x + 1
It is always best to include semicolons:
var x = 1; x = x + 1;