Time remaining
:
:
Test Status
JSJQUERYTEST2
Ques 1 :
Which of the following function of Array object extracts a section of an array and returns a new array?
(A) reverse()
(B) shift()
(C) slice()
(D) some()
Ques 2 :
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 3 :
Is it possible to use JQuery together with AJAX?
(A) Yes
(B) No
Ques 4 :
function() {
var a = 10;
if(a > 5) {
a = 7;
}
alert(a);
}
When executed, what value will be alerted to the screen?
(A) 10
(B) 7
(C) null
(D) undefined
Ques 5 :
What is the output of the following code snippet?
eval(20*4)=?
(A) NaN
(B) 204
(C) 24
(D) 80
Ques 6 :
The JQuery html() method works for both HTML and XML documents
(A) True
(B) False
Ques 7 :
function() {
if(true) {
var a = 5;
}
alert(a);
}
Ok, so what would be the value alerted by this function?
(A) 0
(B) 5
(C) null
(D) undefined
Ques 8 :
What is the output of the following code snippet?
var str = "Apple, Banana, Kiwi";
var res = str.substring(7,13);
(A) Banana
(B) Apple
(C) Kiwi
(D) Banana, Kiwi
Ques 9 :
What is the correct JQuery code to set the background color of all p elements to red?
(A) $("p").manipulate("background-color","red");
(B) $("p").layout("background-color","red");
(C) $("p").style("background-color","red");
(D) $("p").css("background-color","red");
Ques 10 :
var a = 5;
function first() {
a = 6;
}
function second() {
alert(a);
}
Assuming I call these functions in order, what value gets alerted?
(A) 5
(B) 6
(C) null
(D) undefined
Ques 11 :
How to test the pattern for the given text?
var text = "testing: 1, 2, 3";
var pattern = /\d+/g;
(A) text==pattern
(B) text.equals(pattern)
(C) text.test(pattern)
(D) pattern.test(text)
Ques 12 :
With JQuery, look at the following selector: $("div.intro"). What does it select?
(A) The first div element with class="intro"
(B) The first div element with id="intro"
(C) All div elements with id="intro"
(D) All div elements with class="intro"
Ques 13 :
function first() {
window.a = 3;
}
function second() {
alert(a);
}
Assuming I call these functions in order, what's alerted?
(A) 0
(B) 3
(C) null
(D) undefined
Ques 14 :
The JavaScript __ class represents regular expressions
(A) RegExpObj
(B) RegExpClass
(C) RegExp
(D) StringExp
Ques 15 :
Which JQuery method is used to hide selected elements?
(A) hidden()
(B) display(none)
(C) visible(false)
(D) hide()
Ques 16 :
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 17 :
What is the output of the following code snippet?
parseFloat("9.9Hello")?
(A) 9
(B) 9.9
(C) 99
(D) 9.9Hello
Ques 18 :
Which JQuery method is used to set one or more style properties for selected elements?
(A) style()
(B) html()
(C) css()
Ques 19 :
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
Ques 20 :
The __ statement breaks the loop and continues executing the code after the loop.
(A) break
(B) continue
(C) return
(D) None of the above
Submit Answer
Don't Refresh the Page !! ...