1

What is the difference between a semicolon and the separate?

ex: semicolon

 var name = 'Ali';
 var age = 24;

ex: separate

 var name = 'Ali', age = 24;
Quentin
  • 914,110
  • 126
  • 1,211
  • 1,335
Mahmod Abu Jehad
  • 167
  • 2
  • 14
  • There is no difference, both declare multiple variables. There is no performance difference, and the semicolons are not required either. – Kobe Nov 13 '19 at 08:21
  • Semicolon marks the end of a statement, in JavaScript a semi-colon can be optional, according to your layout, it must be used to delimit statements. A common just delimits statements of the same type. – SPlatten Nov 13 '19 at 08:21

0 Answers0