1
Advanced JavaScript
Question Answers
There are various scripting languages that can be used to create dynamic websites.
JavaScript is one such interpreted scripting language as it executes its instructions
directly and freely without compiling machine language instructions.
What is platform independent software?
Ans.Software that can run on any hardware platform (PC, Mac, SunSparc etc.) or software
platform (Windows, Linux, Mac OS etc.) is called platform independent software. JavaScript
is a platform independent scripting language.
Why is JavaScript known as the universal client side scripting language?
Ans.Any JavaScript enabled browser can understand and interpret JavaScript code.
Due to different features, JavaScript is known as a universal client side scripting language.
Write any five features of JavaScript language.
Ans.JavaScript is a lightweight scripting language because it does not support all features of
object oriented programming languages.No need for special software is required to run
JavaScript programs.JavaScript is an object oriented scripting language and it supports
event based programming.It is a case sensitive language.JavaScript helps the browser to
perform input validation without wasting the user’s time by the web server access.It can
handle date and time very effectively.Most of the JavaScript control statements syntax is
same as the syntax of control statements in other programming languages.JavaScript
language provides the ability to create new functions within scripts.A function can be
declared in JavaScript using “function” keyword.JavaScript is a platform independent
scripting language.Any JavaScript-enabled browser can understand and interpreted
JavaScript code. Due to different features, JavaScript is known as universal client side
scripting language.
What are different types of scripting?
Ans.Server side scripting and Client side scripting.Client-side Scripting: the script resides on
a client computer (browser) and can run on the client.Server-side Scripting: the script resides
on a web server.
What is Client-side scripting in JavaScript?
Ans.Client-side Scripting:The script resides on a client computer (browser) and that can run
on the client.These types of scripts are placed inside an HTML document.
What is Server side scripting in JavaScript?
Ans.Server side scripting:The script resides on a web server.To execute the script it must be
activated by the client, and then it is executed on the web server.
, 2
How does the Switch case structure work?
The switch statement tests the value of a given expression against a list of case values.
When a match is found, a block of statements associated with that case is executed.
Why should there not be duplicity between the Switch cases?
Ans.The switch statement tests the value of given expression against a list of case values
When a match is found, a block of statements associated with that case is executed. Thus,
there should not be duplicity between the cases.
What is the syntax for Switch Case Statement?
Ans.
switch(expression)
{
case value1:
statement block 1;
break;
case value2:
statement block 2;
break;
………………………
case value n:
statement block n;
break;
default:
statement block;
}
What is a Looping Statement?
Ans. These are used to execute statements repeatedly while creating programming logic.
Advanced JavaScript
Question Answers
There are various scripting languages that can be used to create dynamic websites.
JavaScript is one such interpreted scripting language as it executes its instructions
directly and freely without compiling machine language instructions.
What is platform independent software?
Ans.Software that can run on any hardware platform (PC, Mac, SunSparc etc.) or software
platform (Windows, Linux, Mac OS etc.) is called platform independent software. JavaScript
is a platform independent scripting language.
Why is JavaScript known as the universal client side scripting language?
Ans.Any JavaScript enabled browser can understand and interpret JavaScript code.
Due to different features, JavaScript is known as a universal client side scripting language.
Write any five features of JavaScript language.
Ans.JavaScript is a lightweight scripting language because it does not support all features of
object oriented programming languages.No need for special software is required to run
JavaScript programs.JavaScript is an object oriented scripting language and it supports
event based programming.It is a case sensitive language.JavaScript helps the browser to
perform input validation without wasting the user’s time by the web server access.It can
handle date and time very effectively.Most of the JavaScript control statements syntax is
same as the syntax of control statements in other programming languages.JavaScript
language provides the ability to create new functions within scripts.A function can be
declared in JavaScript using “function” keyword.JavaScript is a platform independent
scripting language.Any JavaScript-enabled browser can understand and interpreted
JavaScript code. Due to different features, JavaScript is known as universal client side
scripting language.
What are different types of scripting?
Ans.Server side scripting and Client side scripting.Client-side Scripting: the script resides on
a client computer (browser) and can run on the client.Server-side Scripting: the script resides
on a web server.
What is Client-side scripting in JavaScript?
Ans.Client-side Scripting:The script resides on a client computer (browser) and that can run
on the client.These types of scripts are placed inside an HTML document.
What is Server side scripting in JavaScript?
Ans.Server side scripting:The script resides on a web server.To execute the script it must be
activated by the client, and then it is executed on the web server.
, 2
How does the Switch case structure work?
The switch statement tests the value of a given expression against a list of case values.
When a match is found, a block of statements associated with that case is executed.
Why should there not be duplicity between the Switch cases?
Ans.The switch statement tests the value of given expression against a list of case values
When a match is found, a block of statements associated with that case is executed. Thus,
there should not be duplicity between the cases.
What is the syntax for Switch Case Statement?
Ans.
switch(expression)
{
case value1:
statement block 1;
break;
case value2:
statement block 2;
break;
………………………
case value n:
statement block n;
break;
default:
statement block;
}
What is a Looping Statement?
Ans. These are used to execute statements repeatedly while creating programming logic.