Category Archives: Tutorial
If…else statement performs an indicated action only when the condition n evaluates to true; otherwise that action is skipped. The if…else selection statement allows you to specify that a different action is to be performed when the condition is true than when the condition is false. Syntax If (condition) { Code to be executed if
more..
In the language of programming, the kinds of statements that make decisions and loop around to repeat themselves are called control structure. A control structure directs the execution flow through a sequence of script statements based on simple decisions and other factors. JavaScript supports all control structures that are supported by programming languages such as
more..
You will use lots of operators in expressions. Earlier, you used the equal sign (=) as an assignment operator to assign a value to a variable. In the preceding examples with strings, you used the plus symbol (+) to join two strings. An operator generally performs some kind of calculation (operation) or comparison with two
more..
Variables is a location in the computer’s memory where a value can be stored for use by a program. All variables have a name, type and value, and should be declared with a var statement before they are used in a program, although using var to declare variable is no required. The action reserves the
more..
Though JavaScript is a free flow language, it is vital to know the basic framework of the language. These fundamental elements of the language are similar to that of any other language. But for the sake of completeness, this section deals with variables, datatypes, operators, expressions and statements. 5.3.1 Data types: JavaScript supports Numeric, Boolean
more..
Comments can be added to explain the JavaScript, or to make it more readable Single line comments start with//. Multi line comments start with/*and end with*/. This example uses a multi line comment to explain the code: <html> <head> <script type = “text/javascript”> //this is a single line comment /* The code below will write
more..
The Software Tools The best way to learn JavaScript is to type the HTML and scripting code into documents in a text editor. The other component that is required for learning JavaScript is the browser. You don’t have to be connected to the Internet to test your scripts in the browser. You can perform all
more..
NO! Java and JavaScript are two completely different languages in both concept and design! Java (developed by Sun Microsystems) is a powerful and much more complex programming language in the same category as C and C++
more..
JavaScript gives HTML designers a programming tool – HTML authors are normally not programmers, but Java Script is a scripting language with a very simple syntax! Almost anyone can put small “snippets” of code into their HTML pages JavaScript can put dynamic text into an HTML page – A JavaScript statement like this: document. Write(“<h1>’+”</h1>”)
more..
Java Script is the scripting language of the Web. Java Script is used in millions of Web pages to add functionality, validate forms, detect browsers, and much more. The language was invented by Brendan Eich at Netscape (with Navigator (2.0), and has appeared in all Netscape and Microsoft browsers since 1996. Java Sripts official name
more..