Javascript Syntax

by Linda Quinn

Close Window


Declare variables [var is lower case]
var cust;
var balance;

Declare on one line.
var cust, balance;

Declare and assign values together.
var cust = "Smith, John";
var balance = 456.30;
var totdue = price * .06;



Relational Operators

Logical Operators


Arithmetic Operators


Escape Sequences


Assignment Operators



if (expression) do this;


if (expression) do this ; else do this ;



if (expression) do this ; else if (expression) do this ;




Javascript in HTML

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




=================================================================
This content was created by Linda Quinn of LQNet.

See http://www.lqnet.com for a great collection of articles on this and other topics.

=================================================================
Copyright © 2006-2009, LQ Systems,Inc. All rights reserved.


====================================================================
Want an expert to help with your project?    LQ Systems, Inc.   Business Solutions
====================================================================