Time remaining
:
:
Test Status
JSJQUERYRANDOMTEST
Ques 1 :
Which of the following function of Array object returns the last (greatest) index of an element within the array equal to the specified value, or -1 if none is found?
(A) indexOf()
(B) lastIndexOf()
(C) join()
(D) map()
Ques 2 :
What does isNaN function do?
(A) Returns false if the argument is not a number.
(B) Returns true if the argument is not a number.
(C) Returns true if the argument is a number.
(D) None of the above
Ques 3 :
What is an array-like object containing the arguments passed to the currently executing function.
(A) arguments
(B) function
(C) args
(D) None of the above
Ques 4 :
How to determine whether a function exists by using the typeof operator?
var square = function(number1, number2) { return number1 + number2 };
(A) typeof square == 'function'
(B) typeof square == 'object'
Ques 5 :
Which JQuery method returns the direct parent element of the selected element?
(A) parent()
(B) parents()
(C) ancestor()
(D) ancestors()
Ques 6 :
The __ value is returned when you use an object property that does not exist, or a variable that has been declared, but has never had a value assigned to it.
(A) null
(B) undefined
(C) NaN
(D) None of the above
Ques 7 :
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 8 :
What does the $('#myDiv').hover() method do?
(A) It binds the functions you pass as parameters, to the mouseenter and mouseleave events.
(B) Converts the element upon which it was called, into a hoverable menu.
Ques 9 :
What are the looping structures are available in JavaScript?
(A) for, foreach
(B) foreach, while
(C) do-while, foreach
(D) for, while, do-while
Ques 10 :
____________ is the tainted property of a window object.
(A) Pathname
(B) Protocol
(C) Defaultstatus
(D) Host
Ques 11 :
JavaScript entities start with _______ and end with _________.
(A) Semicolon, colon
(B) Semicolon, Ampersand
(C) Ampersand, colon
(D) Ampersand, semicolon
Ques 12 :
var a = 5;
function() {
var a = 7;
alert(a);
}
There are now two variables with the same name, a. Which one does JavaScript pick?
(A) 5
(B) 7
Ques 13 :
Which function do you reference in HTML form data?
(A) value()
(B) formData()
(C) val()
(D) None of the above
Ques 14 :
Which of the following function of String object extracts a section of a string and returns a new string?
(A) slice()
(B) split()
(C) replace()
(D) search()
Ques 15 :
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 16 :
Which of the following are the ways to create a Javascript Object?
(A) var obj = {};
(B) var obj = new Object();
(C) var obj = Object.create()
(D) All of the above
Ques 17 :
You can attach a handler to an event using which method?
(A) eventBind
(B) bind
(C) attach
(D) eventAttach
Ques 18 :
Which of the following is a valid type of function javascript supports?
(A) named function
(B) anonymous function
(C) Both of the above.
(D) None of the above.
Ques 19 :
Which of the following method is used to hide the selected elements?
(A) visible(false)
(B) hidden()
(C) display(none)
(D) hide()
Ques 20 :
Javascript is an object oriented language?
(A) False
(B) True
Submit Answer
Don't Refresh the Page !! ...