Time remaining
:
:
Test Status
JSJQUERYRANDOMTEST
Ques 1 :
What is the output of the following code.
var city = new Array("delhi", "agra", "akot", "aligarh");
city.push('palampur');
console.log(city);
(A) ["palampur", "delhi", "agra", "akot", "aligarh"]
(B) ["delhi", "agra", "akot", "palampur", "aligarh"]
(C) ["delhi", "agra", "akot", "aligarh", "palampur"]
(D) None of them
Ques 2 :
The __ statement breaks the loop and continues executing the code after the loop.
(A) break
(B) continue
(C) return
(D) None of the above
Ques 3 :
What is the output of the following code snippet?
typeof ([]), typeof (new Array())
(A) "array", "object"
(B) "object", "array"
(C) "array", "array"
(D) "object", "object"
Ques 4 :
What is the correct syntax for Array Declaration.
(A) var city = new Array("delhi","agra","akot","aligarh");
(B) var city = ["delhi", "agra", "akot", "aligarh"];
(C) Both a and b
(D) None of them
Ques 5 :
Is JQuery a library for client scripting or server scripting?
(A) Client scripting
(B) Server scripting
Ques 6 :
Is it valid to nest functions in JavaScript?
(A) Yes
(B) No
Ques 7 :
What is the correct JQuery code for making all div elements 100 pixels high?
(A) $("div").height="100"
(B) $("div").height(100)
(C) $("div").yPos(100)
Ques 8 :
What is the correct JavaScript syntax to write "Hello World"?
(A) System.out.println("Hello World")
(B) println ("Hello World")
(C) document.write("Hello World")
(D) response.write("Hello World")
Ques 9 :
var city = new Array("delhi", "agra", "akot", "aligarh","palampur");
console.log(city.slice(2));
(A) ["delhi","agra","akot"]
(B) ["akot","aligarh","palampur"]
(C) ["delhi","agra","akot","aligarh","palampur"]
(D) None
Ques 10 :
______ tag is an extension to HTML that can enclose any number of JavaScript statements.
(A) SCRIPT tag
(B) BODY tag
(C) HEAD tag
(D) TITLE tag
Ques 11 :
What is the difference between .width() and .outerWidth()?
(A) The methods are basically the same. The only difference is that .width() returns a number, whereas outerWidth() a string.
(B) width() returns the computed width of the element, while outerWidth() returns the width plus all the margins and paddings.
(C) No difference. width() is a shorthand alias for outerWidth()
Ques 12 :
JQuery ______is used to set/return arbitrary data to/from an element.
(A) .data()
(B) .item()
(C) .all
(D) All of these
Ques 13 :
What is the correct syntax for referring to an external script called " abc.js"?
(A) <script href=" abc.js">
(B) <script name=" abc.js">
(C) <script src=" abc.js">
(D) None of the above
Ques 14 :
Which of the following JQuery method setups global settings for AJAX requests?
(A) jQuery.ajax( options )
(B) jQuery.ajaxSetup( options )
(C) serialize( )
(D) serializeArray( )
Ques 15 :
Inside which HTML element do we put the JavaScript?
(A) <js>
(B) <scripting>
(C) <script>
(D) <javascript>
Ques 16 :
Which JQuery method should be used to deal with name conflicts?
(A) conflict()
(B) noConflict()
(C) noNameConflict()
(D) nameConflict()
Ques 17 :
<script type="text/javascript">
var s = "9123456 or 80000?";
var pattern = /\d{4}/;
var output = s.match(pattern);
document.write(output);
</script>
(A) 9123
(B) 91234
(C) 80000
(D) None of the above
Ques 18 :
AJAX stand for____________
(A) Alternate java script and XML
(B) Asynchronous java script and XML
(C) Asynchronous java and XML
(D) None of these
Ques 19 :
What does pop() method of the array do?
(A) removes the first element
(B) removes the last element
(C) adds the element to the array at the first position
(D) adds the element to the array at the last position
Ques 20 :
The __ operator determines the type of a given object.
(A) typeof
(B) void
(C) instanceof
(D) delete
Submit Answer
Don't Refresh the Page !! ...