Thursday 3 September 2015

jQuery Multiple Choice Questions And Answers

21. Which statement best explains what "unobtrusive JavaScript" is?
A. JavaScript that doesn't annoy users
B. JavaScript that is separate from HTML
C. JavaScript that does not affect a web page
D. JavaScript that works even with scripting turned off
Ans: B
22. Which of these is NOT a valid comment in JavaScript?
A. // This is a comment
B. /* This is a comment. */
C. /* This is a comment
D. .<!-- This is a comment.
Ans: C
23. How do you use JavaScript within CoffeeScript code?
A. Use the JavaScript keyword
B. Wrap the code in <script> tags
C. Wrap the code in backticks or grave accents [`]
D. You can't embed JavaScript code within CoffeeScript
Ans: C
24. In JavaScript, we can keep a reference to the context outside a function by assigning it to a variable: var self = this. In CoffeeScript, we use:

A. self = this printScope -> console.log self
B. printScope => console.log @
C. printScope => console.log this
D. All of the above
Ans: D
25. What is the correct JavaScript syntax to write "Hello World"?
A. document.write("Hello World")
B. ("Hello World")
C. response.write("Hello World")
D. "Hello World"
Ans: A

26. jQuery is a...
A. JavaScript library
B. Ruby Gem
C. PHP Framework
D. None of the above
Ans: A
27. jQuery's main focus is..
A. AJAX
B. DOM Manipulation
C. Animations
D. All of the above
Ans: D
28. $.foo() is equivalent to..
A. javascript.foo()
B. document.foo()
C. jQuery.foo()
D. None of the above
Ans: C
29. Can jQuery be used on the same page alongside other libraries?
A. Yes
B. No
Ans: A

30. var ps = $("p"); 
ps will be..
A. A linked list
B. A hash or dictionary
C. An array
D. A jQuery object
Ans: D

More Questions & Answers:-
Page1 Page2 Page3 Page4 Page5 Page6

No comments:

Post a Comment