Interview Questions

AJAX Interview Questions Android Interview Questions Angular 2 Interview Questions AngularJs Interview Questions Apache Presto Interview Questions Apache Tapestry Interview Questions Arduino Interview Questions ASP.NET MVC Interview Questions Aurelia Interview Questions AWS Interview Questions Blockchain Interview Questions Bootstrap Interview Questions C Interview Questions C Programming Coding Interview Questions C# Interview Questions C++ Interview Questions Cakephp Interview Questions Cassandra Interview Questions CherryPy Interview Questions Clojure Interview Questions Cobol Interview Questions CodeIgniter interview Questions CoffeeScript Interview Questions Cordova Interview Questions CouchDB interview questions CSS Buttons Interview Questions CSS Interview Questions D Programming Language Interview Questions Dart Programming Language Interview Questions Data structure & Algorithm Interview Questions DB2 Interview Questions DBMS Interview Questions Django Interview Questions Docker Interview Questions DOJO Interview Questions Drupal Interview Questions Electron Interview Questions Elixir Interview Questions Erlang Interview Questions ES6 Interview Questions and Answers Euphoria Interview Questions ExpressJS Interview Questions Ext Js Interview Questions F# Interview Questions Firebase Interview Questions Flask Interview Questions Flex Interview Questions Fortran Interview Questions Foundation Interview Questions Framework7 Interview Questions FuelPHP Framework Interview Questions Go Programming Language Interview Questions Google Maps Interview Questions Groovy interview Questions GWT Interview Questions Hadoop Interview Questions Haskell Interview Questions Highcharts Interview Questions HTML Interview Questions HTTP Interview Questions Ionic Interview Questions iOS Interview Questions IoT Interview Questions Java BeanUtils Interview Questions Java Collections Interview Questions Java Interview Questions Java JDBC Interview Questions Java Multithreading Interview Questions Java OOPS Interview Questions Java Programming Coding Interview Questions Java Swing Interview Questions JavaFX Interview Questions JavaScript Interview Questions JCL (Job Control Language) Interview Questions Joomla Interview Questions jQuery Interview Questions js Interview Questions JSF Interview Questions JSP Interview Questions KnockoutJS Interview Questions Koa Interview Questions Laravel Interview Questions Less Interview Questions LISP Interview Questions Magento Interview Questions MariaDB Interview Questions Material Design Lite Interview Questions Materialize CSS Framework Interview Questions MathML Interview Questions MATLAB Interview Questions Meteor Interview Questions MongoDB interview Questions Moo Tools Interview Questions MySQL Interview Questions NodeJS Interview Questions OpenStack Interview Questions Oracle DBA Interview Questions Pascal Interview Questions Perl interview questions Phalcon Framework Interview Questions PhantomJS Interview Questions PhoneGap Interview Questions Php Interview Questions PL/SQL Interview Questions PostgreSQL Interview Questions PouchDB Interview Questions Prototype Interview Questions Pure CSS Interview Questions Python Interview Questions R programming Language Interview Questions React Native Interview Questions ReactJS Interview Questions RequireJs Interview Questions RESTful Web Services Interview Questions RPA Interview Questions Ruby Interview Questions Ruby on Rails Interview Questions SAS Interview Questions SASS Interview Questions Scala Interview Questions Sencha Touch Interview Questions SEO Interview Questions Servlet Interview Questions SQL Interview Questions SQL Server Interview Questions SQLite Interview Questions Struts Interview Questions SVG Interview Questions Swift Interview Questions Symfony PHP Framework Interview Questions T-SQL(Transact-SQL) Interview Questions TurboGears Framework Interview Questions TypeScript Interview Questions UiPath Interview Questions VB Script Interview Questions VBA Interview Questions WCF Interview Questions Web icon Interview Questions Web Service Interview Questions Web2py Framework Interview Questions WebGL Interview Questions Website Development Interview Questions WordPress Interview Questions Xamarin Interview Questions XHTML Interview Questions XML Interview Questions XSL Interview Questions Yii PHP Framework Interview Questions Zend Framework Interview Questions

Top 28 Prototype Interview Questions for 2022

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 are the types of String Methods are available in Prototype?

Prototype String Methods:
blank() camelize() inspect() strip() toJSON()
capitalize() dasherize() interpolate() stripScripts() succ()
empty() endsWith() isJSON() stripTags() toQueryParams()
escapeHTML() extractScripts() startsWith() sub() truncate()
evalJSON() gsub() parseQuery() toArray() unescapeHTML()
evalScripts() include() scan() times() underscore()

5) 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.

6) What is inspect() method in Prototype String Method?

inspect() method: This method is used to returns a debug-oriented version of the string.

7) What is empty() method in Prototype Element Method?

empty() method is used to check whether the element is empty or not.

8) 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.

9) What are the steps to create the formatted output in Prototype?

The steps to create the formatted output are:
  • Step1: Create a template
  • Step2: Defining actual values
  • Step3: Mapping Keys and replacing Values

10) 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.

11) What is $A() method in Prototype?

$A() method: This method is used to converts the single argument it receives into an array object.

12) 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.

13) 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.

14) What is Date.toJSON() in Prototype?

The Date.toJSON() method is used to convert the date into a JSON string.

15) 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)

16) What is the use of PeriodicalExecuter object?

PeriodicalExecuter object: It is used to execute a function many times after a certain period of time.

17) What is the major advantage of PeriodicalExecuter?

The major advantage of PeriodicalExecuter is: PeriodicalExecuter shields you against multiple parallel executions of the callback function.

18) 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();

)19) 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()

20) Name some callbacks that are not implemented by all browsers?

Callbacks that are not implemented by all browsers are:
  • onLoaded
  • onLoading
  • onInteractive
  • onUninitialized

21) 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()

22) 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

23) 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])

24) What will be the output of the following code snippet?

var heyObject = {};  

['foo', 'Tuto', 'rial'].each(function(name, index) {  

this[name] = index;  

}, heyObject);   

heyObject;
Output: { foo: 0, Tuto: 1, rial: 2}

25) What is the syntax of pluck() method in Prototype?

The syntax of pluck() method is: Iterator.pluck(propertyName);

26) What is the use of isHash() method in Prototype?

isHash() method: Returns true if object is an instance of the Hash class, Otherwise returns false.

27) What are the form methods available in Prototype?

The form methods available in Prototype are:
disable()

enable()

findFirstElement()

focusFirstElement()

getElements()

getInputs()

request()

reset()

serialize()

serializeElements()

28) What is the use of isJSON() method in Prototype?

isJSON() method: It is used to check the string is valid JSON with the help of regular expressions.



ADVERTISEMENT
ADVERTISEMENT