+ 1

Why after do {...} while; I must use semicolon?

1st Jul 2016, 3:45 PM
buremu
2 Answers
+ 1
The semicolon is only obligatory when you have two or more statements on the same line. You shouldn’t put a semicolon after a closing curly bracket }. The only exceptions are assignment statements, such as var obj = {};
1st Jul 2016, 8:57 PM
ZinC
ZinC - avatar
0
its for closing
7th Jul 2016, 2:23 AM
Sarfraz Saddique
Sarfraz Saddique - avatar