MSBTE I 5th Semester Computer/IT Department | Client Side Scripting MCQs Sample Question Paper | | MSBTE I Scheme

CSS MCQs Sample Question Paper


1. Which of the following is not JavaScript Data Types?

A. Undefined

B. Number

C. Boolean

D. Float

 

2. Which company developed JavaScript?

A. Netscape

B. Bell Labs

C. Sun Microsystems

D. IBM

 

3. Inside which HTML element do we put the JavaScript?

A. <script>

B. <head>

C. <meta>

D. <style>

 

4. Which of the following is correct about features of JavaScript?

A. It can not Handling dates and time.

B. JavaScript is a object-based scripting language.

C. JavaScript is not interpreter based scripting language.

D. All of the above

 

5. Choose the correct JavaScript syntax to change the content of the

following HTML code.

A. document.getElement (letsfindcourse").innerHTML = "I am a letsfindcourse";

B. document.getElementById (letsfindcourse").innerHTML = "I am a

letsfindcourse";

C. document.getId (letsfindcourse") = "I am a letsfindcourse";

D. document.getElementById (letsfindcourse").innerHTML = I am a

letsfindcourse;

 

6. Which of the following is the correct syntax to display "Letsfindcourse"

in an alert box using JavaScript?

A. alert-box("Letsfindcourse");

B. confirm("Letsfindcourse");

C. msgbox("Letsfindcourse");

D. alert("Letsfindcourse");

 

7. What is the correct syntax for referring to an external script called

"LFC.js"?

A. <script src="LFC.js">

B. <script source="LFC.js">

C. <script ref="LFC.js">

D. <script type="LFC.js">

 

8. Which of the following is not Javascript frameworks or libraries?

A. Polymer

B. Meteor

C. Cassandra

D. jQuery

 

9. Why so JavaScript and Java have similar name?

A. JavaScript is a stripped-down version of Java

B. JavaScript's syntax is loosely based on Java's

C. They both originated on the island of Java

D. None of the above

 

10. What is the original name of JavaScript?

A. LiveScript

B. EScript

C. Mocha

D. JavaScript

 

11. Why so JavaScript and Java have similar name?
A.  JavaScript is a stripped-down version of Java
B.  JavaScript's syntax is loosely based on Java's
C.  They both originated on the island of Java
D.  None of the above

12. When a user views a page containing a JavaScript program, which machine actually executes the script?
A.  The User's machine running a Web browser
B.   The Web server
C.  A central machine deep within Netscape's corporate offices
D.  None of the above

13.  ______ JavaScript is also called client-side JavaScript.
A.  Microsoft
B.  Navigator
C.  LiveWire
D.  Native

14. __________ JavaScript is also called server-side JavaScript.
A.  Microsoft
B.   Navigator
C.  LiveWire
D.  Native
 

15. What are variables used for in JavaScript Programs?
A.  Storing numbers, dates, or other values
B.   Varying randomly
C.  Causing high-school algebra flashbacks
D.  None of the above
 

16.  _____ JavaScript statements embedded in an HTML page can respond to user events such as mouse-clicks, form input, and page navigation.
A.  Client-side
B.   Server-side
C.  Local
D.  Native

17.  What should appear at the very end of your JavaScript?
The <script LANGUAGE="JavaScript">tag
A.   The </script>
B.    The <script>
C.  The END statement
D.  None of the above

18.  Which of the following can't be done with client-side JavaScript?
A.  Validating a form
B.   Sending a form's contents by email
C.  Storing the form's contents to a database file on the server
D.  None of the above
 

19.  Which of the following are capabilities of functions in JavaScript?
A.  Return a value
B.   Accept parameters and Return a value
C.  Accept parameters
D.  None of the above
 
20.  Which of the following is not a valid JavaScript variable name?
A.  2names
B.  _first_and_last_names
C.  FirstAndLast
D.  None of the above
 

21.Which of the following function of Array object applies a function

simultaneously against two values of the array (from right-to-left) as to

reduce it to a single value?

A - pop()

B - reduce()

C - push()

D - reduceRight()

 

22. What is the output of following Javascript?

var a = 'letsfind';

var b = 'course';

var c = a/b;

document.write(c);

A. letsfindcourse

B. letsfind/course

C. NaN

D. None of the above

 

23. How ++ works in Javascript? Find output of below Javascript code.

var a = 1;

document.write(a--);

document.write(a);

A. 00

B. 01

C. 11

D. 10

 

24. Find output of below Javascript addition code

document.write("1 plus 1 is " + 1 + 1);

A. 2

B. 1 plus 1 is 2

C. 1 plus 1 is 11

D. 1 plus 1 is 1 + 1

 

25.In JavaScript, Arrays are data type. State True or False

A. True

B. False

 

26. Does JavaScript allow exception handling?

A. Yes, it provides try, catch as well as throw key word for exception handling

B. Yes, but it provides only try block

C. Yes, but it provides only Try catch block, but does not allow throw exception

D. No

 

27. Which of the following method checks if its argument is not a number?

A. isNaN()

B. nonNaN()

C. NaN()

D. None of the above

 

28. What if you use parseInt() to convert a string containing decimal

value?

A. Throws Error

B. It returns the decimal values in string form

C. If returns only the integer portion of the number

D. None of the listed option

 

29. What is the output of below Javascript code?

alert (typeof new Date() );

A. Throws Error

B. object

C. Displays Nothing

D. Current Date

 

30. What if we put ++ operator inside if condition? find the output of

below code

< script>

var a = 10;

if(a == a++)

document.write(a);

A. Error

B. Nothing is printed

C. 10

D. 11

 

31.  JavaScript is interpreted by _________
A.  Client
B.   Server
C.  Object
D.  None of the above

32.  Using _______ statement is how you test for a specific condition.
A.  Select
B.  If
C.  Switch
D.  For

33.  Which of the following is the structure of an if statement?
A.  if (conditional expression is true) thenexecute this codeend if
B.   if (conditional expression is true)execute this codeend if
C.  if (conditional expression is true)   {then execute this code>->}
D.  if (conditional expression is true) then {execute this code}

34.  How to create a Date object in JavaScript?
A.  dateObjectName = new Date([parameters])
B.   dateObjectName.new Date([parameters])
C.  dateObjectName := new Date([parameters])
D.  dateObjectName Date([parameters])

35.  The _______ method of an Array object adds and/or removes elements from an array.
A.  Reverse
B.   Shift
C.  Slice
D.  Splice

36.  To set up the window to capture all Click events, we use which of the following statement?
A.  window.captureEvents(Event.CLICK);
B.   window.handleEvents (Event.CLICK);
C.  window.routeEvents(Event.CLICK );
D.  window.raiseEvents(Event.CLICK );

37.  Which tag(s) can handle mouse events in Netscape?
A.  <IMG>
B.  <A>
C.  <BR>
D.  None of the above

38.  ____________ is the tainted property of a window object.
A.  Pathname
B.   Protocol
C.  Defaultstatus
D.  Host

39.  To enable data tainting, the end user sets the _________ environment variable.
A.  ENABLE_TAINT
B.   MS_ENABLE_TAINT
C.  NS_ENABLE_TAINT
D.  ENABLE_TAINT_NS

40.  In JavaScript, _________ is an object of the target language data type that encloses an object of the source language.
A.  a wrapper
B.   a link
C.  a cursor
D.  a form


Contact us : 

                    Instagram:  @msbte_solution

                    Youtube:    MSBTE Solution      


 


Post a Comment

Previous Post Next Post