Time remaining
:
:
Test Status
JSJQUERYRANDOMTEST
Ques 1 :
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
Ques 2 :
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 3 :
var city = new Array("delhi", "agra", "akot", "aligarh","palampur");
console.log(city.shift());
(A) agra
(B) akot
(C) delhi
(D) aligarh
Ques 4 :
What is the use of a return statement in a function?
(A) Returns the value and continues executing rest of the statements
(B) Returns the value and stops the program
(C) Returns the value and stops executing the function
(D) Stops executing the function and returns the value
Ques 5 :
What should appear at the very end of your JavaScript?
The
(A) The <script>
(B) The </script>
(C) The END statement
(D) None of the above
Ques 6 :
Which of the following function of Boolean object returns a string of either 'true' or 'false' depending upon the value of the object?
(A) toSource()
(B) toString()
(C) valueOf()
(D) None of the above.
Ques 7 :
How to create a function with the JavaScript Function constructor ?
(A) var func = Function("x","y","return x+y");
(B) var func = Function(x,y){ return x+y;}
(C) var func = new Function("x", "y", "return x + y");
(D) None of the above
Ques 8 :
When referencing an HTML element preceded by a # (pound or hash), what javascript function is this equivalent to?
(A) getElementById
(B) getElementByClassName
(C) getElementByTagName
(D) None of the above
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 :
The __ operator determines whether an object is an instance of another object.
(A) typeof
(B) void
(C) delete
(D) instanceof
Ques 11 :
In which version of the jquery, efficiency of the web page increased.
(A) minified version
(B) normal version
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 of the following is correct?
(A) jQuery is a JSON Library
(B) jQuery is a JavaScript Library
Ques 14 :
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 15 :
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 16 :
What does .size() method of jquery returns?
(A) No. of element in object
(B) No. of variable in object
(C) Both a and b
(D) None of these
Ques 17 :
The .each method is the more convenient form of _______ loop.
(A) do while
(B) for
(C) for each
(D) None of these
Ques 18 :
____________ is the tainted property of a window object.
(A) Pathname
(B) Protocol
(C) Defaultstatus
(D) Host
Ques 19 :
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 20 :
Which is the correct way to write a JavaScript array?
(A) var txt = new Array(1:"tim",2:"kim",3:"jim")
(B) var txt = new Array:1=("tim")2=("kim")3=("jim")
(C) var txt = new Array("tim","kim","jim")
(D) var txt = new Array="tim","kim","jim"
Submit Answer
Don't Refresh the Page !! ...