3. Advancec Javascript
3. Advancec Javascript
3 Advanced
JavaScript
Introduction
• There is variety of scripting languages used to develop dynamic
websites.
• JavaScript is an interpreted scripting language.
programming languages such as PHP, ASP.net, The client-side scripting language involves
Ruby, ColdFusion, Python, C# etc. are server languages such as HTML5, JavaScript etc.
side scripting languages.
Server-side scripting is useful in customizing The clientside scripts are generally used
the web pages and implements for validation purpose and effectively minimize the
the dynamic changes in the websites. load to the server.
Special software (web server software) is Whereas client side scripts requires web
required to execute server-side script browser as an interface.
11th Standard Revision
• The value for the case must be similar data type as the
variable in switch.
• If the statement within loop is a single line then the curly parenthesis
is optional.
• Here loop will be executed repeatedly as long as the condition is true.
• Note that if condition always true then loop would be
executed infinitely so after some execution condition
becomes false.
Example :
Program for loop :
Output :
According to W3C :
Example :
var str="Information Technology";
document.write ("length of string is :-" + str.length);
document.write ("Substring is :-" + str.substr (12,10));
• You can access and set the items in an array by referring to its
indexnumber and the index of the first element of an array is zero.
Array Object :
• arrayname[0] is the first element, arrayname[1] is second element
and so on.