0% found this document useful (0 votes)
145 views9 pages

Class Xii - Web (Javascript) Worksheet: Theory Questions

worksheet for web application

Uploaded by

Sakshi Jha
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
145 views9 pages

Class Xii - Web (Javascript) Worksheet: Theory Questions

worksheet for web application

Uploaded by

Sakshi Jha
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 9

CLASS XII -WEB(JAVASCRIPT) WORKSHEET

THEORY QUESTIONS:
QUES-1: What is a constant ? Declare a constant MAX and assign the value 10.
QUES-2: Name the built-in function to be used in the following situations :
(i) To remove backslash from string.
(ii) To return number of days in a month for specified year.
QUES-3: What is the difference in ( / ) and ( % ) ?
QUES-4: When is the blur event of an element called ?
QUES-5: Identify the incorrect statement:

a) With JavaScript you can show, hide, change, resize images


b) JavaScript can do some processing of forms but cannot validate user input
when the user submits the form.
c) JavaScript objects are considered as a dictionary with string keys.
d) In JavaScript, function could be assigned to variables just like any other data
types.
QUES-6: Explain with example the difference between implicit and explicit declaration of
variables.
QUES-7: Difference between client side scripting and server side scripting .
QUES-8: Explain the use of type of attribute in <script> tag .
QUES-9: && is a type of ___________ operator in JavaScript.
QUES-10: Compare properties and methods of an object w.r.t. JavaScript objects.
QUES-11: To use random() in JavaScript the syntax is :
(A) random() (C) Random.random()
(B) rand() (D) Math.random()
QUES-12: In JavaScript if a variable is defined using var in a compound statement ‘‘if’’, it
will __________.
(A) be visible to the entire compound ‘‘if’’ statement
(B) not be visible to the entire compound ‘‘if’’ statement
(C) be visible to the entire function
(D) not be visible to the entire function
QUES-13: To use an object’s methods or properties, we write the object’s name,
__________ and then the method/property name.
(A) a dot[.]
(B) an asterisk[*]
(C) an ampersand[&]
(D) a pound[#]
QUES-14: Differentiate between Property and Method with example.
QUES-15: What is Event handler ?
QUES-16: Explain the conditional operator with example .
QUES-17: What is the purpose of the parseInt() function in JavaScript?
QUES-18: What will be the output of parseInt("123abc")? Explain why.
QUES-19: Explain the significance of the radix parameter in parseInt(). What will
parseInt("11", 2) return?
QUES-20: What will parseFloat("123.45xyz") return? Why?
QUES-21: Can parseFloat() convert "12.34e5" into a number? What will be the output?
QUES-22: What will be the result of parseFloat("12.00")? Explain.
QUES-23: What will be the output of Number("10.25") and Number("10abc")? Explain the
difference.
QUES-24: What is the output of String(null) and String(undefined)?
QUES-25: Which function should be used to convert 12.34abc to 12.34?
QUES-26: Identify the type of operators.
i) *, /, +
ii) >>, >>>
iii) <, >=, >, ==
a) i)- Arithmetic operators, ii) relational operators, iii) comparison operators
b) i)-Arithmetic operators, ii) comparison operators iii) Assignment operators
c) i)-Arithmetic operators, ii) Bitwise operators iii) comparison operators
d) i)-Arithmetic operators, ii) comparison operators iii) logical operators
QUES-27: ECMA is an international standard organization for_______________________.

a) information and communication system c) scripting languages


b) networking and communication system d) browser development
OUTPUT QUESTIONS:
QUES-1:

QUES-2: Analyse the given program segement and determine how many times the loop will
be executed. What will be the value of A after loop is terminated.
var A,B

QUES-3:
QUES-4: Write the values of c and d after execution of following code:
var a =1;
var b=2;
var c;
c=b++;
d=a++;
c++;
QUES-5:
QUES-6:

QUES-7:
QUES-7:
Predict the output of the following code.
<script type="text/javascript">
document.write("<i>Hello World!</i>");
</script>
a) HELLO WORLD
b) Hello World
c) Hello World
d) Error
QUES-8

QUES-9
PROGRAMMING QUESTIONS:
1.

2.Write a function that displays a prompt box which accepts a name and displays a greet
message ‘‘hello , Have a good day’’ when the user enters a name in a
(paragraph) which has an id ‘‘demo’’. The function header is as below :
function myfunc()
{
}
3.

4.
Write a code in JavaScript that accepts a binary number from the user and displays its
decimal equivalent number.
5. Write a code in JavaScript to accept five numbers from user, store them in an array, and
display the sorted array.
6 and 7.

8.

You might also like