Apeejay School Half Yearly Examination - 2020 Class - XII: Date: 08.10.2020 F.M. - 35 Section - A

Download as pdf or txt
Download as pdf or txt
You are on page 1of 3

Apeejay School

Half Yearly Examination - 2020


Class - XII
Date : 08.10.2020 F.M. - 35
Section - A
I) Choose the correct option : [5]
1) Which one of the following is not a valid datatype in JavaScript ?
(a) Number (b) List (c) Time (d) Decimal
2) Document object uses ___________ method to output some text to the page-document.
(a) load() (b) active() (c) write() (d) output()

3) What will be the value of res in the following expression?


var res = “70” + 25
(a) 95 (b) 7025 (c) 25 (d) No output due to error

4) The <div> element should turn red when someone moves the mouse on top it in the following
coding :
<div ___________ =this.style.backgroundColor='red'">myDIV.</div
(a) onLoad() (b) onMouseOut() (c) onMouseOver() (d) onUnLoad()
5) Which is the correct assignment operator that will result same as x = x * y
(a) += (b) *= (c) %= (d) -=

II) Correct the following statements : [5]


1) && is a unary operator that is placed before its single operand, which indicates the data type of the
operand.
2) HTML code to create an email link is <mailHREF=”admin@cetjob.com”>
3) var 3 * 5
4) Formal parameter is the value or variable sent to a function when it is evoked.
5) Output of the following statement will be 453
document.write("Math.max(453,”null”) = "+Math.max(453,”null”)+"<br>");
Section - B
III) Answer the following questions : [3+3+3 = 9]
1) How is the internal style sheet different from the external style sheet?
Explain with an example.
2) Differentiate between pre and post increment operators with example.
3) Identify the area labelled as A and B in the following screen. State one use of those areas

Section - C
II) Do as directed : [2+1+2+2=7]
1) Deduce the output
A=‘‘Be positive’’
(a) var d = A.indexOf(‘‘positive’’)
(b)document.write(A.length)

2) <a href="D:\Apeejay_2020-21\CSS\p2.html" style="text-decoration:none";>


Explain the following syntax

3) var a = 10;
var b = "String";
var linebreak = "";
result = (typeof b == "string" ? "B is String" : "B is Numeric");
document.write("Result => " + result + linebreak);
document.write("Result => ");
document.write(result);
document.write(linebreak);
result = (typeof a == "string" ? "A is String" : "A is Numeric");
document.write("Result => ");
document.write(result);
document.write(linebreak);

4) Underline the errors and rewrite the code after removing the errors.
Function 3_alert_box
{
alert(“Hi!, I am from a function.’);
}
Section - D
1) Write the HTML code to generate the following output : [3+3+3=9]

a) Background colour of the pages as shown


b) Each frame will contain pages with specified content

2) Write a JavaScript program to find out whether the given year is leap or not. Use prompt box for input
the year.

3) Observe the figure given below and do as directed:

i) The object on the left hand side shows the position and size of the image for frame 1. The colour of
the object is blue.
ii) The object on the right hand side shows the position and size of the image for frame 20. The colour
of the object is green.
iii) The circle on frame 1 moves and transforms into an ellipse on frame 20.
Write the procedure and property settings for animating the above scenario.

************

You might also like