Note: This Question is unanswered, help us to find answer for this one
2. Evaluate the 4 following premises: 1. RegExp is an extension to the built-in RegExp object 2. Ir has one class method and one instance method 3. instance method is an alias of some native RegExp method 4. instance method returns string value as a result.
Answer
Correct Answer:
One statement is false
Note: This Question is unanswered, help us to find answer for this one
3. To make a contribution, a developer might need to make a clone of Prototype project from:
Note: This Question is unanswered, help us to find answer for this one
17. -background-color'.camelize(); returns:
Answer
Correct Answer:
backgroundColor
Note: This Question is unanswered, help us to find answer for this one
18. When using Element#on as opposed to Element#observe, what is different about its return value?
Answer
Correct Answer:
Element#on has a #stop method which will remove excessive event handlers.
Note: This Question is unanswered, help us to find answer for this one
19. The 'onSuccess' callback for any of the Ajax method will auto-convert responses to JSON if what takes place?
Answer
Correct Answer:
The Content Type header is set to application/JSON
Note: This Question is unanswered, help us to find answer for this one
20. Which class serves a purpose of creation an observer on an element that listens for a particular event, that element's descendants?
Answer
Correct Answer:
Event.Handler
Note: This Question is unanswered, help us to find answer for this one
21. Class method String#gsub:
Answer
Correct Answer:
Does not exist, it is an instance method
Note: This Question is unanswered, help us to find answer for this one
22. Which PrototypeJS method of functions have become a native method of functions?
Answer
Correct Answer:
Function.bind
Note: This Question is unanswered, help us to find answer for this one
23. What do you use to add your own custom DOM methods?
Answer
Correct Answer:
Element.addMethods
Note: This Question is unanswered, help us to find answer for this one
24. There is an object in Prototype that is informed about every Ajax request: Ajax.Responders. Is it possible to register callbacks that will fire on a state of ANY Ajax.Request?
Answer
Correct Answer:
Yes, by using Ajax.Responders.register
Note: This Question is unanswered, help us to find answer for this one
25. The code: var json = transport.responseText.evalJSON(true); will check for what?
Answer
Correct Answer:
Malicious user data.
Note: This Question is unanswered, help us to find answer for this one
26. How can you get a copy of the array without any null or undefined values?
Answer
Correct Answer:
By calling Array#compact() method.
Note: This Question is unanswered, help us to find answer for this one
27. What object would you use in Prototype, and what are the benefits of using said object?
Answer
Correct Answer:
Ajax.PeriodicalUpdater – It significantly reduces the load on your servers by reducing the number of requests.
Note: This Question is unanswered, help us to find answer for this one
28. How would you create an AJAX call to get the url '/echomyid'?
Answer
Correct Answer:
new Ajax.Request('/echomyid');
Note: This Question is unanswered, help us to find answer for this one
29. Which method that is not available to convert to JSON in Prototype
Answer
Correct Answer:
Element#toJSON
Note: This Question is unanswered, help us to find answer for this one
30. Using Element.Layout you can measure elements that are hidden:
Answer
Correct Answer:
as long as their parents are visible.
Note: This Question is unanswered, help us to find answer for this one
31. When writing custom DOM methods, what must be placed as the first argument?
Answer
Correct Answer:
The element itself.
Note: This Question is unanswered, help us to find answer for this one
32. Why is event delegation important in Prototype?
Answer
Correct Answer:
It makes it possible to truncate resources to a single container.
Note: This Question is unanswered, help us to find answer for this one
33. Prototype JS framework with version 1.6.0 defines two additional class properties:
Answer
Correct Answer:
subclasses and superclass
Note: This Question is unanswered, help us to find answer for this one
34. Utilities $A and $R create an array and ObjectRange object. What will be their results given the following string; $A($R('a', 'e')) ?
Answer
Correct Answer:
['a', 'b', 'c', 'd', 'e']
Note: This Question is unanswered, help us to find answer for this one
35. How would you create a new div element and insert it as the last child of the body?
Note: This Question is unanswered, help us to find answer for this one
55. What object is used to parse JSON?
Answer
Correct Answer:
String#evalJSON
Note: This Question is unanswered, help us to find answer for this one
56. (42).toPaddedString(4) returns what?
Answer
Correct Answer:
0042
Note: This Question is unanswered, help us to find answer for this one
57. Evaluate the following statement: Hash is a set of key/value pairs with Element.Layout subclass. For convenience a developer can use #H() alias.
Answer
Correct Answer:
Correct
Note: This Question is unanswered, help us to find answer for this one
58. The actual Ajax requests are made by creating instances of
Answer
Correct Answer:
Ajax.Request object
Note: This Question is unanswered, help us to find answer for this one
59. You have a class that inherits from a parent class. How do you call a parent version of a class method from within a child class method of the same name?
Answer
Correct Answer:
function($super){ $super() }
Note: This Question is unanswered, help us to find answer for this one
60. What is the alternative of Element.extend() function in Prototype?
Answer
Correct Answer:
The dollar function $()
Note: This Question is unanswered, help us to find answer for this one
61. If your data is not an instance of an object and you invoke the toJSON method, where should the syntax: toJSON() be located in the string?
Answer
Correct Answer:
At the end.
Note: This Question is unanswered, help us to find answer for this one
62. When using data from an untrusted source, it should be sanitized. What does this entail?
Answer
Correct Answer:
Removing malicious data from user input.
Note: This Question is unanswered, help us to find answer for this one
63. By using the Element#on object in Prototype event API, what benefit is being gained?
Answer
Correct Answer:
Concisely written code and event delegation from within a container.
Note: This Question is unanswered, help us to find answer for this one
64. Element#measure(property) gives:
Answer
Correct Answer:
pixel value of an element's dimension specified by property
Note: This Question is unanswered, help us to find answer for this one
65. Lets say you have an array with name myArray. How would you organize a loop?
Answer
Correct Answer:
Using "for" statement or Array#each iterator.
Note: This Question is unanswered, help us to find answer for this one
66. What solution has Prototype 1.7 introduced to provide a more concise API?
Answer
Correct Answer:
Element.Layout
Note: This Question is unanswered, help us to find answer for this one
67. How would you wait for the DOM to be loaded so that you can start manipulating the page with Javascript?
Answer
Correct Answer:
document.observe('dom:loaded',function(){ //code here });
Note: This Question is unanswered, help us to find answer for this one
68. Which of the following is not an example of an AJAX callback?
Answer
Correct Answer:
onInteractive
Note: This Question is unanswered, help us to find answer for this one
69. How can you inherit from a Storage class?
Answer
Correct Answer:
After defining a descendant using Class.create() method, inherit from class Storage by using Object.extend() method.
Note: This Question is unanswered, help us to find answer for this one
70. After editing your browser script to work with Prototype extensions, what coding can you add to the end to make it function more solidly?
Answer
Correct Answer:
Element.extend(my_div)
Note: This Question is unanswered, help us to find answer for this one
71. What object is informed about every AJAX request?
Answer
Correct Answer:
Ajax.Responders
Note: This Question is unanswered, help us to find answer for this one
72. Instance method String#evalJSON():
Answer
Correct Answer:
Evaluates the string as JSON and returns the resulting object
Note: This Question is unanswered, help us to find answer for this one
73. Do Element.Layout#get and Element#measure work together?
Answer
Correct Answer:
Yes.
Note: This Question is unanswered, help us to find answer for this one
74. Select the wrong JavaScript-related MIME-types that handled by Prototype
Answer
Correct Answer:
application/ext-javascript
Note: This Question is unanswered, help us to find answer for this one
75. If you wanted to extend all elements with an additional method to do 'foo' and you have already created the method foo() how would you add it?