MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION
(eutonomous)
asonec- 27001-2013 Ceruiied)
WINTER - 2023 EXAMINATION
‘Mode! Answer - Only for the Use of RAC Assessors
Subject Name: Client Side Scripting subject code: | 99519
Important instructions to examiners:
1) The answers should be examined by key words and not as word-to-word as given inthe model answer scheme
2) The model answer and the answer writen by candidate may vary but the examiner may try to assess the
Understanding evel ofthe candidate.
3) The language errars such as grammatical, spelling errors should not be given more Importance (Not applicable for
subject English and Communication Skil
4) Wiile assessing figures, examiner may gle credit for principal components indicated in the figure. The figures
craw by candidate and model answer may vary. The examiner may give credit for any equivalent figure érawn,
5) Celts may be given step wise for numerical problems, In some cates, the assumed constant values may vary and
there may be some difference in the candidate's answers and model answer.
6) Im case of some questions credt may be given by judgement on part of examiner of relevant answer based on
candidate's understanding
7), For programming language papers, credit maybe given to any other program based on equivalent concept.
8) As per the policy decision of Maharashtra State Government, teaching in English/Marathi and Bilingual (English +
Marathi} medium is introduced at First year of AICTE diploma Pragramme from academic year 2021-2022. Hence if
the students in fist year (frst and second semesters) write answers in Marathi or bilingual language (English
‘Marathi, the Eraminer shal consider the same and assess the answer tased on matching of concepts with model
9)_For programming language papers, n answer session comments and outout isnot required,
@. [Sub ‘Answer Marking
No. | Q. Scheme
N
T "tempt any EIVE oT he folowing TOM
a) State meaning of each token of the following statement and describe M
it
i) Ha;
ii) document, bgcolor,
Ans | (il) + is the increment operator and a is the operand, hence a+* will increme Anyone
| value of a by 1. explained - 1
Meach,
(il) The bgCotor property specifies the background color of HTML document.
'b) _ Write and explain syntax of prompi() method in JavaScript. Mw
‘Ans ‘* prompt() method is used to display a dialogue box to the user to prompt tH Definition- 7
an input. M
© Thas two buttons “OK” and “CANCEL”, if the user click on the “OK” button | Syntax: 1M
then it will retum the inputed value , if the user clicks on the "CANCEL" button]
then it will return a null value
+ Syntax: prompt(text)
Page No: 1 | 2422519 Model Answe... | & | +
H
a MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION
tasononaus)
(s0n0 S503" O12 Coriod
= Example:
vvar name = prompt ("Enter a name’);
document. Write(name);
<)_ | List various assignment operators Supported by JavaScript, explain any
two with the help of suitable example.
Wi
‘Ans | assignment operators supported by JavaScript
Operators Meaning
Equal to
Plus Equal to
Minus Equal to
Divide Equal to
Modulus Equal to
Multiply Equal to
Example:
«
|; document. write(num); // num 20
(* += first add the value to the existing value of the variable then assign it the new}
list
Explain any 2
“1M
a} Differentiate between sh and push) methods of an Array object
Aas
Shite push
1. shift method is used to delete the f 7. push method is used to insert zer
element of an existing array more element at the end of an exist
2 Syntax
arrshift(; n2,..elementns
Example 3 Example:
MAHARASHTRA STATE BOAO OF TECHNICAL EDUCATION
(autor)
asonec. 2700172073 carted)
Page No:2 | 24MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION
(futonemous)
(iso/iec-27001-2018 Certified)
€} | State the meaning of ‘Defining a function". Explain with the help of an example vy
‘Ans | « A function is a block of code that takes some input to perform some ¢ Explanation
‘computation, 1™
* The main purpose of the function is to put commonly used or repeatedly Example: 1
task in a function, so instead of writing the code again and again we can) = M
instead.
The function can be defined as followed:
syntax:
function fane_name(parameter! ,parameter?,....parametem)
iicode
}
Example:
1) | Give syntax of and explain the use of small “with” clause, 2M
ns | “with” clause is used to directly access the properties and method of an object. Explanation
Syntax:
with (object) ‘Syntax- 1M
{
JJobject
}
Example
9) Witlithe help of suitable example explain the Date object and any two methods 2M
Date object.
Ans | =Date™ object [s used when, we want to perform some operation on date, thas | Explanation-
method which helps you performs some task related to date, 1M
Example Example: 1
Page No: 3 | 24MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION
(Gstonomaus)|
(asonec-27001-2013 Certiied)
‘Attempt any THREE of the following:
T2M
a
Write a JavaScript that accepts a number and displays addition of digits
of that number in a message box.
aM
‘Ans
it number"); //accept number from user
Relevant
code- 4M
8)
Describe the navigator object in JavaScript. Describe the methods of
navigator object which is used to display browser name and version.
aM
‘Ans
‘© Navigator object isa representation of user's browser
‘Navigator is an object of window.
» Methods of navigator object- Only one method is supported by Navigatg
Object.
i) javaEnabled()- returns true if the browser has java enabled
+ We use appName to display browser name. appName is a property of navig
+ appName property returns browser name.
+ We use appVersion to display browser version. appVersion is a prope!
navigator.
+ appVersion property returns browser version.
+ Example
Explanation -
2M
Method ~ 2
M
Page No: 4 | 24MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION
(eutonomaus)|
(asoniec- 27001-2018 Certified)
DD)
Give syntax of and explain for-in Toop in javascript with the help of suitable
example.
aM
ns
Forin Loop:
Syntax
For(x in object){
H1code to be executed
)
‘+ For-in loop is used to loop through the properties of an object.
+ In syntax, variable represents the property name, and object is the object!
iterated.
«It’s handy for tasks like accessing or manipulating object properties
Example:
Explanation =
2M
Syntax-1M.
Example-1 M
gD
Write an HTML script that accepts Amount, Rate of interest and Period
from user. When user submits the information a JavaScript function must
calculate and display simple interest in a message box. (Use formula S.l. =
PNR/100)
aM
‘Ans
oR
shead>
Principal Amount:
Rate of Interst:
button onclick="interest()"> Simple Interest