-
1. What Is Prototype?
- Prototype is a JavaScript framework which is used in dynamic web applications.
- It is a namespace and a module that is used to manage HTML forms.
- It is also a JavaScript Library.
-
2. Who Is The Developer Of Prototype?
Sam Stephenson is the developer of Prototype.
-
3. What Are The Features Of Prototype?
The features of Prototype are:
- Extends DOM elements.
- Powerful Ajax features.
- Does not provide widgets.
- Advanced support for event management.
- It is not a complete application development framework.
- Built-in support for class-style OOP including inheritance.
-
4. What Is Underscore () Method In Prototype String Method?
underscore () method:
This method is used to converts a String into a series of words separated by an underscore. -
5. What Is Inspect () Method In Prototype String Method?
inspect () method:
This method is used to returns a debug-oriented version of the string. -
6. What Is Empty () Method In Prototype Element Method?
empty () method is used to check whether the element is empty or not.
-
7. What Is Templates In Prototype?
Templates:
- It is used for formatting group of similar objects.
- It is also used to produce formatted output for these objects.
-
8. What Are The Steps To Create The Formatted Output In Prototype?
The steps to create the formatted output are:
Step 1:
Create a template.Step 2:
Defining actual values.Step 3:
Mapping Keys and replacing Values. -
9. What Is Include () Method In Prototype?
include method:
This method is used to determine whether the value is included in the range or not.If the value is included, then returns true otherwise returns false.
-
10. What Is $a () Method In Prototype?
$A () method:
This method is used to converts the single argument it receives into an array object. -
11. What Is $w () Method In Prototype?
The $w () method is used to splits a string into an array.
Here, all whitespace are treated as delimiters.
-
12. What Is Ajax In Prototype?
- AJAX stands for Asynchronous JavaScript and XML.
- It is a technique which is used for creating faster, better and more interactive web applications.
-
13. What Is Date.tojson () In Prototype?
The Date.toJSON () method is used to convert the date into a JSON string.
-
14. What Are The Ways To Construct A Hash Instance In Prototype?
Two ways to construct a Hash instance are:
- By using new JavaScript keyword.
- By using $H(Prototype Utility function).
-
15. What Is The Use Of Periodical Executor Object?
Periodical Executor object:
It is used to execute a function many times after a certain period of time. -
16. What Is The Major Advantage Of Periodical Executor?
The major advantage of Periodical Executor is:
Periodical Executor shields you against multiple parallel executions of the callback function. -
17. What Is The Syntax Of $r Utility Function In Prototype?
The syntax of $R utility function is:
$R(start, end[, exclusive = false]);Example:
$R (1, 10).inspect ();
-
18. What Are The Ajax Methods Available In Prototype?
The AJAX methods available in Prototype are:
- Ajax Options
- Ajax.PeriodicalUpdater ()
- Ajax. Request ()
- Ajax. Responders ()
- Ajax. Response ()
- Ajax. Updater ()
-
19. Name Some Callbacks That Are Not Implemented By All Browsers?
Callbacks that are not implemented by all browsers are:
- On Loaded
- On Loading
- On Interactive
- On Uninitialized
-
20. What Are The Methods Provided By Json For Encoding In Prototype?
The methods provided by JSON for Encoding are:
- Number.toJSON ()
- String.toJSON ()
- Array.toJSON ()
- Hash.toJSON ()
- Date.toJSON ()
- Object.toJSON ()
-
21. What Are The Features Of Json (javascript Object Notation)?
The features of JSON are:
- JSON is a lightweight data-interchange format.
- Easy to read and write for humans.
- Easy to parse and generate for machines.
- Based on JavaScript Programming Language.
- Completely language independent.
-
22. What Is The Use Of $h Method In Prototype?
$H method:
This method is used to convert object into enumerable Hash object.Syntax:
$H ([obj]) -
23. What Will Be The Output Of The Following Code Snippet?
var anyObject = {};
[‘foo’, ‘Tuto’, ‘rial’].each(function(name, index) {
this[name] = index;
}, anyObject);
anyObject;
Output:
{foo: 0, Tuto: 1, rial: 2} -
24. What Is The Syntax Of Pluck () Method In Prototype?
The syntax of pluck () method is:
Iterator. Pluck (property Name); -
25. What Is The Use Of Is Hash () Method In Prototype?
is Hash() method:
Returns true if object is an instance of the Hash class, Otherwise returns false. -
26. What Are The Form Methods Available In Prototype?
The form methods available in Prototype are:
- Disabled ()
- Enable ()
- Find First Element ()
- Focus First Element ()
- Getelements ()
- Get Inputs ()
- Request ()
- Reset ()
- Serialize ()
- Serialize Elements ()
-
27. What Is The Use Of Json () Method In Prototype?
JSON () method:
It is used to check the string is valid JSON with the help of regular expressions.
HTML Interview Questions
HTML Tutorial
Java Script Interview Questions
Java Script Tutorial
MySQL Interview Questions
Angular JS Interview Questions
MySQL Tutorial
MVC Framework Interview Questions
HTML Interview Questions
MVC Framework Tutorial
Microsoft Entity Framework Interview Questions
Microsoft Entity Framework Tutorial
Java Interview Questions
Java Script Interview Questions
Java Tutorial
Framework7 Interview Questions
Framework7 Tutorial
Java collections framework Interview Questions
MySQL Interview Questions
Unittest Framework Tutorial
Unittest Framework Interview Questions
Angular JS Interview Questions