Every statement in javascript terminated with semicolon (;).
Most of the javascript control statements are similar to control statements in C language.
Advantages of JavaScript
Less server Load: JS can validate user input before sending to the server saving server traffic and less load on your server. Being client-side language reduces the demand on the website server
User don’t need to wait for a page reload to see if they have forgot something to enter like signup forms.
JavaScript can be used to include items such as drag-and-drop components and sliders to give a better Interface to your site visitors.
JavaScript is easy and simple to learn and implement.
JavaScript can be used in a huge variety of applications and JS can be inserted into any web page regardless of the file extension. JavaScript code can be used inside scripts written in other languages such as Perl and PHP.
Third party add-ons like Greasemonkey enable JavaScript developers to write snippets of Script which can execute on web pages to extend its functionality.
JavaScript code is interpreted line by line making it very easy to debug error.
JavaScript has all capabilities of a procedural language can perform all kind of condition checking, loops and branching that can be executed in a web page.
JavaScript is platform independent language.
Disadvantages of JavaScript
Javascript code gets executes on the user’s computer which can be exploited for malicious purposes.
JavaScript gets Interpreted differently by different browsers whereas server-side scripts will always produce the same output.