JavaScript Syntax

Last Updated Jul 29, 2015, 07:00:14 PM





JavaScript Syntax

JavaScript borrows most of its syntax from Java but is also influenced by Awk, Perl and Python.

JavaScript is case-sensitive and uses the Unicode character. The javascript code must be placed in between the <script> ...</script> tags, in case, if you are working with single file.

When the browser sees javascript code inside the <script> tag, the browser will automatically interpret the code that is written inside the <script> tags. The basic javascript syntax would like below.


Everything you write in JavaScript program is a statement that can be executed by the browser. A statement is nothing but some data, function, or a variable or a method, etc.

Example
Try It Now

JavaScript Strings

Like other programming languages, javascript also works with strings.

Strings are used to store the string literal data in javascript programs

Example
Try It Now

Sources and Credits

The source of the content has been referred and updated with Mozilla Developer Network and W3C Organization

Last Updated Jul 29, 2015, 07:00:14 PM