Tuesday 10 June 2008

JavaScript

JavaScript is a C based language. It is not strongly typed. It does support object orientation. It is a client side scripting language like VBscript.
The Wikipedia article on JavaScript is here.




METHODS
document.write("Testing");
window.alert("Test Message"); - displays a pop-up window.

Variables
Variables are not stongly typed.
This is an example of declaring them:
var x =0; //Declares variable and sets value to zero.
x="Hello"; //resets the same variable to a string value.
x=true; //Example of assigning a boolean value

FLOW CONTROL
Switch - similar to the case statement in VB.net
If
For.. Next
Loop

No comments: