Prototype JavaScript Framework Interview Questions & Answers

  1. Question 1. What Is Prototype?

    Answer :

    • 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. Question 2. Who Is The Developer Of Prototype?

    Answer :

    Sam Stephenson is the developer of Prototype.

  3. HTML Interview Questions

  4. Question 3. What Are The Features Of Prototype?

    Answer :

    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.
  5. Question 4. What Is Underscore () Method In Prototype String Method?

    Answer :

    underscore () method: This method is used to converts a String into a series of words separated by an underscore.

  6. HTML Tutorial

  7. Question 5. What Is Inspect () Method In Prototype String Method?

    Answer :

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

  8. Java Script Interview Questions

  9. Question 6. What Is Empty () Method In Prototype Element Method?

    Answer :

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

  10. Question 7. What Is Templates In Prototype?

    Answer :

    Templates:

    • It is used for formatting group of similar objects.
    • It is also used to produce formatted output for these objects.
  11. Java Script Tutorial
    MySQL Interview Questions

  12. Question 8. What Are The Steps To Create The Formatted Output In Prototype?

    Answer :

    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.

  13. Question 9. What Is Include () Method In Prototype?

    Answer :

    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.

  14. Angular JS Interview Questions

  15. Question 10. What Is $a () Method In Prototype?

    Answer :

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

  16. MySQL Tutorial

  17. Question 11. What Is $w () Method In Prototype?

    Answer :

    The $w () method is used to splits a string into an array.

    Here, all whitespace are treated as delimiters.

  18. MVC Framework Interview Questions

  19. Question 12. What Is Ajax In Prototype?

    Answer :

    • AJAX stands for Asynchronous JavaScript and XML.
    • It is a technique which is used for creating faster, better and more interactive web applications.
  20. HTML Interview Questions

  21. Question 13. What Is Date.tojson () In Prototype?

    Answer :

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

  22. MVC Framework Tutorial

  23. Question 14. What Are The Ways To Construct A Hash Instance In Prototype?

    Answer :

    Two ways to construct a Hash instance are:

    • By using new JavaScript keyword.
    • By using $H(Prototype Utility function).
  24. Question 15. What Is The Use Of Periodical Executor Object?

    Answer :

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

  25. Microsoft Entity Framework Interview Questions

  26. Question 16. What Is The Major Advantage Of Periodical Executor?

    Answer :

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

  27. Microsoft Entity Framework Tutorial

  28. Question 17. What Is The Syntax Of $r Utility Function In Prototype?

    Answer :

    The syntax of $R utility function is: $R(start, end[, exclusive = false]);

    Example:

    $R (1, 10).inspect ();

  29. Java Interview Questions

  30. Question 18. What Are The Ajax Methods Available In Prototype?

    Answer :

    The AJAX methods available in Prototype are:

    • Ajax Options
    • Ajax.PeriodicalUpdater ()
    • Ajax. Request ()
    • Ajax. Responders ()
    • Ajax. Response ()
    • Ajax. Updater ()
  31. Java Script Interview Questions

  32. Question 19. Name Some Callbacks That Are Not Implemented By All Browsers?

    Answer :

    Callbacks that are not implemented by all browsers are:

    • On Loaded
    • On Loading
    • On Interactive
    • On Uninitialized
  33. Java Tutorial

  34. Question 20. What Are The Methods Provided By Json For Encoding In Prototype?

    Answer :

    The methods provided by JSON for Encoding are:

    • Number.toJSON ()
    • String.toJSON ()
    • Array.toJSON ()
    • Hash.toJSON ()
    • Date.toJSON ()
    • Object.toJSON ()
  35. Framework7 Interview Questions

  36. Question 21. What Are The Features Of Json (javascript Object Notation)?

    Answer :

    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.
  37. Question 22. What Is The Use Of $h Method In Prototype?

    Answer :

    $H method: This method is used to convert object into enumerable Hash object.

    Syntax: $H ([obj])

  38. Framework7 Tutorial

  39. Question 23. What Will Be The Output Of The Following Code Snippet?

    Answer :

    var anyObject = {};  

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

    this[name] = index;  

    }, anyObject);   

    anyObject;  

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

  40. Java collections framework Interview Questions

  41. Question 24. What Is The Syntax Of Pluck () Method In Prototype?

    Answer :

    The syntax of pluck () method is: Iterator. Pluck (property Name);

  42. MySQL Interview Questions

  43. Question 25. What Is The Use Of Is Hash () Method In Prototype?

    Answer :

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

  44. Unittest Framework Tutorial

  45. Question 26. What Are The Form Methods Available In Prototype?

    Answer :

    The form methods available in Prototype are:

    • Disabled ()
    • Enable ()
    • Find First Element ()
    • Focus First Element ()
    • Getelements ()
    • Get Inputs ()
    • Request ()
    • Reset ()
    • Serialize ()
    • Serialize Elements ()
  46. Unittest Framework Interview Questions

  47. Question 27. What Is The Use Of Json () Method In Prototype?

    Answer :

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

  48. Angular JS Interview Questions