Easy learning with example program codes

javascript syntax

JavaScript Syntax specifies the set of rules for constructing a JavaScript program.
The is used to write JavaScript statements. The script tag can be used anywhere in head or body but it is a good practice to use it within tag.


<script language="javascript" type="text/javascript">
   //JavaScript statements


language: represents the java script language.
type: represents the content type.

Important points:

1. It is a case sensitive language.
2. JavaScript statements will be followed by a semicolon.


<script language="javascript" type="text/javascript">
        num1 = 100; num2 = 200;

Semicolons can be omitted if JavaScript statements are in a different line.


<script language="javascript" type="text/javascript">
	num1 = 100
        num2 = 200


Industrial Training

We offers Placement Oriented Training on Java, Spring, JSF, Hibernate, PHP, AngularJS, Angular 4, PLSQL, Oracle BI Publisher etc. We also provides Online training, please mail us at


We also provides the Development services for Website Development , Java Development, PHP Development, Android App Development etc. You can contact us on

Copyright © 2019 CodesJava Protection Status SiteMap Reference: Java Wiki