InterviewSolution
This section includes InterviewSolutions, each offering curated multiple-choice questions to sharpen your knowledge and support exam preparation. Choose a topic below to get started.
| 51. |
When does a cycle occur during memory leak?(a) No reference occurs(b) Two objects reference(c) One object gets referenced(d) Three object gets referencedThe question was posed to me in a national level competition.I want to ask this question from JavaScript and Memory Leak in portion Caching, Debugging and Animation of JavaScript |
|
Answer» The correct option is (b) Two objects reference |
|
| 52. |
What are the two parts of JavaScript libraries?(a) “script” tag and “body” tag(b) External JavaScript and the“script” tag(c) “html” tag and “body” tag(d) ”html” and “style” tagThe question was asked in an online interview.This is a very interesting question from External JavaScript and PHP topic in division Caching, Debugging and Animation of JavaScript |
|
Answer» RIGHT answer is (b) External JavaScript and the“script” tag Explanation: All JavaScript libraries consists of two parts: The external JavaScript itself, which is SIMPLY a text FILE with the containing JavaScript code, saved as a .js file. A “script” tag referencing the external JavaScript file and DEFINED on the page(s) that uses the library. The |
|
| 53. |
What is the purpose of destroying the functions and objects?(a) Consume unnecessary CPU cycles(b) Prevent the dropping of reference count to 0(c) Centralize the responsibility to clean up(d) All of the mentionedI have been asked this question in an interview for internship.This intriguing question originated from JavaScript and Memory Leak topic in portion Caching, Debugging and Animation of JavaScript |
|
Answer» The correct ANSWER is (d) All of the mentioned |
|
| 54. |
What will happen if you specify an absolute URL in the Worker constructor?(a) Resolves itself(b) Must have the same origin(c) Must not have the same origin(d) Specify the addressThis question was posed to me during an interview.My doubt stems from Web Workers in portion Caching, Debugging and Animation of JavaScript |
|
Answer» Right ANSWER is (b) Must have the same origin |
|
| 55. |
In which way can the closure compiler can be used?(a) Open source(b) Run time application(c) Web application(d) Only Open source and Web applicationThe question was asked in examination.I want to ask this question from The Closure Compiler in portion Caching, Debugging and Animation of JavaScript |
|
Answer» Correct answer is (d) Only Open source and Web APPLICATION |
|
| 56. |
What is the next step after calling the startTimeLogging()?(a) Interpret the code(b) Compile the code(c) Run the code(d) Debug the codeI have been asked this question in an international level competition.Query is from Cache Variables and Properties across Scope topic in chapter Caching, Debugging and Animation of JavaScript |
|
Answer» Right CHOICE is (c) Run the code |
|
| 57. |
Why do we need to create locally scoped variables to hold value?(a) To optimize the testing process(b) To increase the speed(c) To minimize memory usage(d) To cache the reference document.locationThis question was addressed to me during an online exam.My enquiry is from Cache Variables and Properties across Scope topic in chapter Caching, Debugging and Animation of JavaScript |
|
Answer» The correct option is (d) To cache the REFERENCE DOCUMENT.location |
|
| 58. |
The attribute location belongs to which element?(a) document(b) html(c) image(d) preI have been asked this question in exam.The query is from Cache Variables and Properties across Scope topic in section Caching, Debugging and Animation of JavaScript |
|
Answer» RIGHT OPTION is (a) DOCUMENT Best explanation: window.location.href returns the href (URL) of the CURRENT page. The attribute location belongs to the document element. |
|
| 59. |
What is the purpose of the area element?(a) Area of the text(b) Shape and coordinates of the hotspot(c) Shape and area of the hotspot(d) Coordinates and areaI got this question by my school principal while I was bunking the class.My question is taken from Image Map in chapter Caching, Debugging and Animation of JavaScript |
|
Answer» The correct option is (b) Shape and coordinates of the hotspot |
|
| 60. |
Which of the following can be implemented using animation?(a) Fireworks(b) Fade Effect(c) Roll-in or Roll-out(d) All of the mentionedThe question was posed to me during a job interview.The origin of the question is Animation in section Caching, Debugging and Animation of JavaScript |
|
Answer» The correct ANSWER is (d) All of the mentioned |
|
| 61. |
What is the purpose of the Attr object in the HTML DOM?(a) Used to focus on a particular part of the HTML page(b) HTML Attribute(c) Used to arrange elements(d) CSS attributeThis question was posed to me during an online interview.I'm obligated to ask this question of HTML DOM topic in portion Caching, Debugging and Animation of JavaScript |
|
Answer» The correct choice is (B) HTML Attribute |
|
| 62. |
The object that looks to the thread that creates it is _______________(a) Window(b) Worker(c) Element(d) HashI have been asked this question in quiz.I want to ask this question from Web Workers topic in chapter Caching, Debugging and Animation of JavaScript |
|
Answer» CORRECT option is (b) Worker To explain: A web worker is a JavaScript running in the background, without AFFECTING the performance of the page. The Worker object: this is what a worker looks like from the OUTSIDE to the THREAD that creates it. |
|
| 63. |
In what way does the closure compiler help in checking the code?(a) Warnings(b) Suddenly aborts(c) Rejects malicious inputs(d) Terminates the executionThis question was posed to me at a job interview.I need to ask this question from The Closure Compiler topic in division Caching, Debugging and Animation of JavaScript |
|
Answer» CORRECT option is (a) Warnings Best explanation: Closure compiler PARSES your JavaScript, ANALYZES it, REMOVES dead code and rewrites and minimizes what’s left. The Closure Compiler provides warnings for illegal JavaScript and warnings for potentially dangerous operations, helping you to produce JavaScript that is LESS buggy and easier to maintain. |
|
| 64. |
What is the purpose of the advanced mode in the closure compiler?(a) Renames variables(b) Renames function(c) Both Renames variables and function(d) Changes structuresThis question was addressed to me during an internship interview.This is a very interesting question from The Closure Compiler topic in chapter Caching, Debugging and Animation of JavaScript |
|
Answer» Right option is (C) Both Renames variables and function |
|
| 65. |
What is the purpose of the basic validation?(a) Data correctness(b) Mere data existence(c) Both Data correctness and Mere data existence(d) Data modificationI got this question in an online quiz.My doubt stems from Validation topic in section Caching, Debugging and Animation of JavaScript |
|
Answer» Right OPTION is (b) Mere data existence |
|
| 66. |
What is the purpose of the method nodeMap.setNamedItem()?(a) Sets ID(b) Sets attribute node(c) Sets element name(d) Sets element typeI got this question during a job interview.This is a very interesting question from HTML DOM in division Caching, Debugging and Animation of JavaScript |
|
Answer» Correct choice is (B) Sets ATTRIBUTE node |
|
| 67. |
Which object can be used to create your own blobs?(a) Creator(b) BlobCreator(c) BlobBuilder(d) BuilderBlobThe question was asked in quiz.My question is from Blobs in JavaScript in division Caching, Debugging and Animation of JavaScript |
|
Answer» Right option is (c) BlobBuilder |
|
| 68. |
What is the purpose of the function parameter filetype?(a) File type to be expected(b) File type previously got(c) File type that should not be got(d) File type availableThis question was posed to me in my homework.This interesting question is from External JavaScript and PHP in portion Caching, Debugging and Animation of JavaScript |
|
Answer» Correct OPTION is (a) FILE type to be expected |
|
| 69. |
The blobs are broken into smaller pieces using which of the following functions?(a) partition()(b) cut()(c) sliceall()(d) slice()The question was asked in an interview for job.Origin of the question is Blobs in JavaScript topic in chapter Caching, Debugging and Animation of JavaScript |
|
Answer» Right CHOICE is (d) slice() |
|
| 70. |
What kind of path can the PHP file be?(a) Absolute(b) Relative(c) Either Absolute or Relative(d) Both Absolute and RelativeThis question was addressed to me during an internship interview.My enquiry is from External JavaScript and PHP in division Caching, Debugging and Animation of JavaScript |
|
Answer» The correct answer is (c) EITHER ABSOLUTE or Relative |
|
| 71. |
Which of the following is added to prefs.js when the console is automatically opened during JavaScript error?(a) user_pref(“javascript.console.open_on_error”, true);(b) user_pref(“javascript.console.open_error “, true);(c) user_pref(“javascript.console.open_error “, false);(d) user_pref(” javascript.console.open_on_error”, false);The question was posed to me in homework.My query is from External JavaScript and PHP topic in portion Caching, Debugging and Animation of JavaScript |
|
Answer» Correct choice is (a) user_pref(“javascript.console.open_on_error”, true); |
|
| 72. |
Which of the following is not the properties of a plug-in entry?(a) name(b) filename(c) mimeTypes(d) valueI have been asked this question in an online interview.My question is from Validation in chapter Caching, Debugging and Animation of JavaScript |
|
Answer» The correct option is (d) value |
|
| 73. |
Which of the following functions are referenced internally?(a) setTimeout(b) setInterval(c) both setTimeout and setInterval(d) clearIntervalThis question was addressed to me in exam.This key question is from JavaScript and Memory Leak in section Caching, Debugging and Animation of JavaScript |
|
Answer» Right choice is (c) both setTimeout and setInterval |
|
| 74. |
During the traversing through the stack, where does it go after it goes to the window?(a) Namespace(b) Function(c) Document(d) NowhereI have been asked this question in an interview.I need to ask this question from Cache Variables and Properties across Scope topic in portion Caching, Debugging and Animation of JavaScript |
|
Answer» Right OPTION is (d) Nowhere |
|
| 75. |
Which of the following is one of the fundamental features of JavaScript?(a) Single-threaded(b) Multi-threaded(c) Both Single-threaded and Multi-threaded(d) Simple-threadedI got this question during a job interview.Query is from Web Workers topic in chapter Caching, Debugging and Animation of JavaScript |
|
Answer» The correct CHOICE is (a) Single-threaded |
|
| 76. |
Which is the function that is called to validate a data?(a) validate()(b) valid()(c) validation()(d) no predefined function for data validationThis question was posed to me at a job interview.This key question is from Validation topic in chapter Caching, Debugging and Animation of JavaScript |
|
Answer» The correct choice is (d) no predefined FUNCTION for DATA VALIDATION |
|
| 77. |
What would happen if the data in the client had been wrong?(a) Sends back the data(b) Waits for correction(c) Sends back the data and Waits for correction(d) Returns the data instantlyI got this question in an interview for internship.This interesting question is from Validation topic in chapter Caching, Debugging and Animation of JavaScript |
|
Answer» The CORRECT choice is (C) Sends back the data and Waits for correction |
|
| 78. |
Which event handler is triggered when the user’s mouse moves onto a link?(a) onMouseOver(b) onMouseOut(c) onMouse(d) onMouseOntoI have been asked this question in examination.I need to ask this question from Animation in section Caching, Debugging and Animation of JavaScript |
|
Answer» The correct option is (a) onMouseOver |
|
| 79. |
What is the necessity to have API?(a) Guide to performing activities(b) Describe particular task(c) Both performing activities and Describe particular task(d) Rearrangement of tasksI have been asked this question in an interview for job.Enquiry is from HTML APIs topic in portion Caching, Debugging and Animation of JavaScript |
|
Answer» The correct answer is (B) Describe particular task |
|
| 80. |
Which of the following attribute takes the source of the PHP file?(a) img(b) src(c) source(d) psrcThe question was asked in quiz.This question is from External JavaScript and PHP topic in section Caching, Debugging and Animation of JavaScript |
|
Answer» The CORRECT ANSWER is (b) src |
|
| 81. |
When does a memory leak happen?(a) Browser doesn’t release memory from objects unnecessary(b) Browser releases too many memories(c) Browser releases memory iteratively(d) Browser releases memory quicklyI got this question in quiz.This intriguing question comes from JavaScript and Memory Leak in division Caching, Debugging and Animation of JavaScript |
|
Answer» Right ANSWER is (a) Browser doesn’t release MEMORY from objects unnecessary |
|
| 82. |
Which of the following is not a navigator property?(a) platform[](b) plugin[](c) userAgent[](d) browser[]This question was addressed to me in a job interview.My query is from Image Map topic in portion Caching, Debugging and Animation of JavaScript |
|
Answer» CORRECT choice is (d) browser[] Explanation: The navigator object CONTAINS information about the browser. All of the above MENTIONED are the PROPERTIES of a navigator. |
|
| 83. |
Which handler is triggered when the content of the document in the window is stable and ready for manipulation?(a) onload(b) manipulate(c) create(d) oncreateI had been asked this question in examination.My question is from JavaScript and Memory Leak in section Caching, Debugging and Animation of JavaScript |
|
Answer» Correct answer is (a) ONLOAD |
|
| 84. |
What is the purpose of the event onAirEvent?(a) Content is played(b) Content is transferred(c) Both Content is played and transferred(d) Content is changedThis question was posed to me during an interview.I want to ask this question from HTML APIs in chapter Caching, Debugging and Animation of JavaScript |
|
Answer» The correct option is (a) Content is played |
|
| 85. |
Which of the following global variables is used to get parameters?(a) $HTTP_GET_VAR[](b) $HTTP_GET_VARS()(c) $HTTP_GET_VARS(d) $HTTP_GET_VARS[]I have been asked this question during a job interview.Question is from External JavaScript and PHP topic in portion Caching, Debugging and Animation of JavaScript |
|
Answer» The correct answer is (d) $HTTP_GET_VARS[] |
|
| 86. |
Which of the following is possible to be referenced in external JavaScript?(a) CPP(b) Cs(c) PHP(d) PythonI have been asked this question in an interview.My question comes from External JavaScript and PHP in chapter Caching, Debugging and Animation of JavaScript |
|
Answer» The correct answer is (C) PHP |
|
| 87. |
The size of blobs are generally calculated in ____________(a) Meters(b) Kilometers(c) Bytes(d) PixelsI got this question by my school principal while I was bunking the class.This question is from Blobs in JavaScript topic in division Caching, Debugging and Animation of JavaScript |
|
Answer» Correct answer is (c) Bytes |
|
| 88. |
The blobs are generally stored in ____________(a) Memory(b) Disk(c) Both Memory and Disk(d) Temporary storageI have been asked this question during an interview for a job.This intriguing question comes from Blobs in JavaScript in portion Caching, Debugging and Animation of JavaScript |
|
Answer» The CORRECT choice is (c) Both Memory and Disk |
|
| 89. |
What will happen if you reference document.location from within an object?(a) Traverses the queue(b) Finds the bugs(c) Traverses the stack(d) Traverses the arrayThe question was posed to me in homework.My question comes from Cache Variables and Properties across Scope topic in chapter Caching, Debugging and Animation of JavaScript |
|
Answer» The correct answer is (c) Traverses the stack |
|
| 90. |
Which is the element that follows the use of “img”?(a) area(b) usemap(c) map(d) any element can follow the use of “img”The question was asked in examination.My enquiry is from Image Map topic in division Caching, Debugging and Animation of JavaScript |
|
Answer» Correct choice is (c) map |
|
| 91. |
What is the purpose of the Legacy DOM?(a) Makes the scripting easier(b) Allows access to few keys and elements(c) Modify the nodes(d) Making the script modularThe question was asked by my college director while I was bunking the class.Origin of the question is HTML DOM in division Caching, Debugging and Animation of JavaScript |
|
Answer» Correct answer is (b) Allows access to few keys and ELEMENTS |
|
| 92. |
How do you focus a particular part of the HTML page in JavaScript?(a) hover()(b) focus()(c) on()(d) focuson()This question was addressed to me by my college professor while I was bunking the class.I'd like to ask this question from Validation in division Caching, Debugging and Animation of JavaScript |
|
Answer» Correct option is (b) FOCUS() |
|
| 93. |
How to find the index of a particular string?(a) position()(b) index()(c) indexOf()(d) positionof()This question was posed to me in unit test.My doubt stems from Validation in division Caching, Debugging and Animation of JavaScript |
|
Answer» The correct OPTION is (c) indexOf() |
|
| 94. |
What does the NamedNodeMap object represent in the HTML DOM?(a) Unordered collection of elements(b) Unordered collection of attributes(c) Unordered collection of nodes(d) Unordered collection of arraysThis question was posed to me by my college professor while I was bunking the class.This intriguing question comes from HTML DOM topic in section Caching, Debugging and Animation of JavaScript |
|
Answer» Correct answer is (d) UNORDERED COLLECTION of arrays |
|
| 95. |
How is everything treated in HTML DOM?(a) Node(b) Attributes(c) Elements(d) ArraysThis question was addressed to me in class test.My question comes from HTML DOM topic in division Caching, Debugging and Animation of JavaScript |
|
Answer» RIGHT choice is (a) NODE The BEST explanation: The HTML DOM model is constructed as a tree of Objects. In the HTML DOM (Document Object Model), everything is a node: The document itself is a document node. All HTML elements are element NODES. All HTML attributes are attribute nodes. TEXT inside HTML elements are text nodes. Comments are comment nodes. |
|
| 96. |
The style property belongs to which of the following object?(a) Element(b) Window(c) Location(d) NavigationI had been asked this question in a national level competition.My question is taken from JavaScript and Memory Leak in chapter Caching, Debugging and Animation of JavaScript |
|
Answer» CORRECT answer is (a) Element For explanation I WOULD say: Each Element object has STYLE and CLASSNAME properties that allow scripts to specify CSS styles for a document element or to ALTER the CSS class names that apply to the element. |
|
| 97. |
In which format does JavaScript support external JavaScript?(a) .js(b) .php(c) .js/php(d) .jssI have been asked this question in an international level competition.Question is taken from External JavaScript and PHP topic in chapter Caching, Debugging and Animation of JavaScript |
|
Answer» The correct choice is (a) .js |
|
| 98. |
Where are memory leaks found?(a) Client side objects(b) Server side objects(c) Both Client side and Server side objects(d) User side objectsThis question was addressed to me in an internship interview.My question is taken from JavaScript and Memory Leak topic in section Caching, Debugging and Animation of JavaScript |
|
Answer» The correct option is (a) Client side objects |
|
| 99. |
What will happen when the data of the jQuery.cache is read from an element?(a) Unique number is retrieved as elem[jQuery.expando](b) Data is read from jQuery.cache[id](c) Unique number is retrieved as elem[jQuery.expando] & Data is read from jQuery.cache[id](d) Data is cleared from jQuery.cache[id]I have been asked this question during an interview.Enquiry is from JavaScript and Memory Leak topic in chapter Caching, Debugging and Animation of JavaScript |
|
Answer» The correct choice is (C) UNIQUE number is retrieved as elem[jQuery.expando] & Data is READ from jQuery.cache[id] |
|
| 100. |
Which API makes the user’s current location available to browser-based application?(a) Java API(b) SDL API(c) Object API(d) Geolocation APII got this question in an online quiz.I'd like to ask this question from HTML APIs in division Caching, Debugging and Animation of JavaScript |
|
Answer» The CORRECT choice is (d) Geolocation API |
|