InterviewSolution
Saved Bookmarks
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.
| 201. |
Carakan is used by which of the following browsers?(a) Firefox(b) Internet Explorer(c) Safari(d) Opera |
|
Answer» The correct answer is (d) Opera The explanation: Opera uses Carakan, which was introduced in 2010. Mozilla uses spidermonkey and safari uses nitro javascript engine. |
|
| 202. |
Which of the following browsers support the usage of the JavaScript logging library log4javascript?(a) IE(b) Safari(c) Opera(d) All of the mentioned |
|
Answer» The correct choice is (d) All of the mentioned Easy explanation: Apache Log4j is a Java-based logging utility. It was originally written by Ceki Gülcü and is part of the Apache Logging Services project of the Apache Software Foundation. Since a major use of JavaScript logging is in browser testing, log4javascript is tested and works across all recent major browsers, including: Internet Explorer 5+ for Windows Mozilla, Firefox, Netscape Google Chrome Safari 1.3+ Opera 7.5+ WebKit Konqueror 3.4+ |
|
| 203. |
Which of the following browsers use Webkit?(a) Chrome(b) Internet Explorer(c) Safari(d) Both Chrome and Safari |
|
Answer» Correct choice is (d) Both Chrome and Safari Explanation: WebKit is a browser engine used in Apple’s Safari browser and other products. Webkit is what Chrome and Safari use, and is your target for most mobile web development since it is used as the layout or rendering engine for Android devices as well as mobile Safari for iOS devices and the Silk browser on Kindle Fires. |
|
| 204. |
Which of the following are JavaScript optimizers?(a) JSMin(b) Packer(c) Minify(d) Both JSMin and Packer |
|
Answer» The correct choice is (d) Both JSMin and Packer Best explanation: JSMin is a filter which removes comments and unnecessary whitespace from JavaScript files. It typically reduces filesize by half, resulting in faster downloads. JavaScript optimizers such as JSMin and Packer are specially designed for modern web programming techniques and are able to understand and preserve conditional comments, and similar. |
|
| 205. |
What does the browser do to set up a TCP/IP connection?(a) TCP one-way handshake(b) TCP two-way handshake(c) TCP three-way handshake(d) TCP four-way handshake |
|
Answer» Right choice is (c) TCP three-way handshake For explanation: A three-way handshake is a method used in a TCP/IP network to create a connection between a local host/client and server. It is a three-step method that requires both the client and server to exchange SYN and ACK (acknowledgment) packets before actual data communication begins. |
|
| 206. |
What is the purpose of XMLHttpRequest?(a) Multiple loading(b) Load content by loading new document(c) Load content without loading new document(d) Repetitive loading |
|
Answer» Right option is (c) Load content without loading new document To elaborate: The XMLHttpRequest object can be used to request data from a web server. XMLHttpRequest makes it possible to load additional content from the Web without loading a new document, a core component of AJAX. |
|
| 207. |
BLOB stands for ______________(a) Binary Little Object(b) Binary Large Object(c) Broken Large Object(d) Binary Small object |
|
Answer» Right option is (b) Binary Large Object For explanation I would say: A Blob is an opaque reference to, or handle for, a chunk of data. The name comes from SQL databases, where it means “Binary Large Object.” In JavaScript, Blobs often represent binary data, and they can be large, but neither is required: a Blob could also represent the contents of a small text file. |
|
| 208. |
What is the central concept of JavaScript memory management?(a) Reliability(b) Reachability(c) Efficiency(d) Transparency |
|
Answer» Right choice is (b) Reachability The explanation: The central concept of JavaScript memory management is a concept of reachability. The main cause for leaks in garbage collected languages are unwanted references. A distinguished set of objects are assumed to be reachable: these are known as the roots. Typically, these include all the objects referenced from anywhere in the call stack (that is, all local variables and parameters in the functions currently being invoked), and any global variables. Objects are kept in memory while they are accessible from roots through a reference or a chain of references. |
|
| 209. |
Which of the following is a subtype of Blob?(a) Elemental Object(b) Create Object(c) Data Object(d) File Object |
|
Answer» Correct answer is (d) File Object The best I can explain: The File interface is based on Blob, inheriting blob functionality and expanding it to support files on the user’s system. The client-side JavaScript File object is a subtype of Blob: a File is just a Blob of data with a name and a modification date. |
|
| 210. |
What is the function of the XML parser?(a) Converts XML document to XML DOM object(b) Converts XML DOM object to XML document(c) Converts XML DOM object to a comment(d) Compiles the html document |
|
Answer» The correct choice is (a) Converts XML document to XML DOM object To elaborate: An XML parser converts an XML document into an XML DOM object – which can then be manipulated with JavaScript. All major browsers have a built-in XML parser to access and manipulate XML. |
|
| 211. |
Which method to use while working with XML fragments, instead of XML()?(a) XMLInterface()(b) XMLClass()(c) XMLList()(d) XMLArray() |
|
Answer» The correct answer is (c) XMLList() For explanation: An XML fragment is an XML document with no single top-level root element. When working with XML fragments, use XMLList() instead of XML(). |
|
| 212. |
Which of the following is an example to perform the most common XML manipulations using the XML objects invocation?(a) insertChildBefore()(b) insertChildAfter()(c) appendChildAfter(…)(d) appendChildBefore(…) |
|
Answer» Right choice is (a) insertChildBefore() Easiest explanation: E4X is designed so that you can perform most common XML manipulations using language syntax. E4X also defines methods you can invoke on XML objects. Here, for example, is the insertChildBefore() method: |
|
| 213. |
Which of the following are the drag and drop events?(a) drop(b) dragstart(c) both drop and dragstart(d) dropover |
|
Answer» Right option is (c) both drop and dragstart Easiest explanation: HTML Drag and Drop interfaces enable applications to use drag and drop features in Firefox and other browsers. The API defines the following seven event types : dragstart drag dragend dragenter dragover dragleave drop |
|
| 214. |
Which among these is a property that reports rotation of mouse wheel axes?(a) ctrlKey(b) alterX(c) alterY(d) deltaX |
|
Answer» The correct choice is (d) deltaX Explanation: A handler for a wheel event receives an event object with all the usual mouse event properties, and also deltaX, deltaY, and deltaZ properties that report rotation around three different mouse wheel axes. |
|
| 215. |
What is the purpose of the method getUserData(key)?(a) Returns the associated object(b) Gets the user data(c) Returns the user data(d) Gets the user key |
|
Answer» Right choice is (a) Returns the associated object The best explanation: The method getUserData(key) returns the object associated to a key on a this node. The object must first have been set to this node by calling setUserData with the same key. |
|
| 216. |
Which of the below is a liberal reverse of Ajax?(a) HTTP(b) HTML(c) XML(d) Comet |
|
Answer» Correct choice is (d) Comet The best explanation: Comet is the reverse of Ajax: in Comet, it is the web server that initiates the communication, asynchronously sending messages to the client. The big advantage of Comet is that each client always has a communication link open to the server. |
|
| 217. |
Which of the following uses scripted HTTP?(a) XML(b) HTML(c) Ajax(d) CSS |
|
Answer» Correct choice is (c) Ajax The explanation: AJAX stands for Asynchronous JavaScript And XML. The key feature of an Ajax application is that it uses scripted HTTP to initiate data exchange with a web server without causing pages to reload. |
|
| 218. |
How will the HTTP GET request be sent from the browser?(a) Remote server(b) Local server(c) By itself(d) Standby Server |
|
Answer» Right option is (a) Remote server Explanation: The two most common methods of http are get and post. Once the TCP/IP connection has been established, the browser sends an HTTP GET request over the connection to the remote server. The remote server finds the resource and returns it in an HTTP Response, the status of which is 200 to indicate a good response. |
|
| 219. |
Which of the following is a feature of the HTTP response?(a) Mandatory response body(b) Optional response body(c) URL being released(d) Optional set of response headers |
|
Answer» The correct option is (a) Mandatory response body Best explanation: The HTTP response sent by a server has three parts : a numeric and textual status code that indicates the success or failure of the request a set of response headers the response body |
|
| 220. |
How does SVG describe complex shapes?(a) Path of lines(b) Path of curves(c) Path of lines and curves(d) Planes |
|
Answer» The correct choice is (c) Path of lines and curves To explain I would say: SVG stands for ‘Scalable Vector Graphics’ and it is used to define graphics for the Web. SVG is mostly used for vector type diagrams like Two-dimensional graphs in an X, Y coordinate system, Pie charts etc. SVG describes complex shapes as a “path” of lines and curves that can be drawn or filled. |
|
| 221. |
What is the purpose of the Block tab?(a) To block the response(b) To block the request(c) To block the mouse pointer(d) To block the cursor |
|
Answer» Correct answer is (b) To block the request The best I can explain: The Block tab allows us to block content coming in our request. |
|
| 222. |
Which of the following ensures additional interactivity mechanism?(a) WAI ARIA(b) Geolocation API(c) Object API(d) SDL API |
|
Answer» The correct answer is (a) WAI ARIA For explanation: Web Accessibility Initiative – Accessible Rich Internet Applications (WAI-ARIA) is a technical specification published by the World Wide Web Consortium (W3C) that specifies how to increase the accessibility of web pages, in particular, dynamic content, and user interface components developed with Ajax, HTML, JavaScript, and related technologies. WAI ARIA offers mechanisms to ensure that this additional interactivity remains usable independent of devices and disabilities. |
|
| 223. |
Which is the in-house library of Yahoo!?(a) Dojo(b) YUI(c) Prototype(d) Closure |
|
Answer» Correct choice is (b) YUI Explanation: YUI is the in-house library of Yahoo!, and it is used on their home page. The Yahoo User Interface Library is a discontinued open-source JavaScript library for building richly interactive web applications using techniques such as Ajax, DHTML, and DOM scripting. |
|
| 224. |
Which of the following is not a JavaScript framework?(a) Rico(b) Prototype(c) Joco(d) DoJo |
|
Answer» Right choice is (d) DoJo Easy explanation: Dojo Toolkit is an open source modular JavaScript library (or more specifically JavaScript toolkit) designed to ease the rapid development of cross-platform, JavaScript/Ajax-based applications and web sites. Rico was an open-source JavaScript library for developing rich internet applications with Ajax. |
|
| 225. |
What is the framework?(a) User time efficiency(b) Author time efficiency(c) Both User time and Author time efficiency(d) Client time efficiency |
|
Answer» Right choice is (b) Author time efficiency For explanation I would say: A framework, or software framework, is a platform for developing software applications. Frameworks are an author-time efficiency, meaning that they make coding tasks much simpler by abstracting the real work that goes into doing those tasks. |
|
| 226. |
What is the purpose of the Dojo framework?(a) Focuses on DOM and Ajax utilities(b) Advertises incredible depth(c) Ajax utilities(d) Modular |
|
Answer» Right choice is (b) Advertises incredible depth To elaborate: The Dojo toolkit is an open-source modular toolkit containing a JavaScript library that is designed for rapidly creating JavaScript/Ajax-based websites and cross-platform applications. Dojo is a large framework that advertises its “incredible depth.” It includes an extensive set of UI widgets, a package system, a data abstraction layer, and more. |
|
| 227. |
The functions provide() and require() of Dojo toolkit and Google’s Closure library are used for ___________(a) declaring and loading modules(b) declaring functions(c) declaring modules(d) loading modules |
|
Answer» Correct option is (a) declaring and loading modules To explain I would say: Both the Dojo toolkit and Google’s Closure library define provide() and require() functions for declaring and loading modules. |
|
| 228. |
What is closure?(a) Function objects(b) Scope where function’s variables are resolved(c) Both Function objects and Scope where function’s variables are resolved(d) Function return value |
|
Answer» The correct choice is (c) Both Function objects and Scope where function’s variables are resolved The best explanation: A combination of a function object and a scope (a set of variable bindings) in which the function’s variables are resolved is called a closure. |
|
| 229. |
Which of the following is not an example of closures?(a) Objects(b) Variables(c) Functions(d) Graphics |
|
Answer» Right choice is (d) Graphics For explanation: In JavaScript, closures are created every time a function is created, at function creation time. Technically, all JavaScript functions are closures: they are objects, and they have a scope chain associated with them. |
|
| 230. |
Which of the following uses a lot of CPU cycles?(a) GUI(b) Statically generated graphics(c) Dynamically generated graphics(d) Generic scoping |
|
Answer» Correct choice is (c) Dynamically generated graphics To elaborate: Dynamic graphics for data, means simulating motion or movement using the computer. It may also be thought of as multiple plots linked by time. Hence dynamically generating graphics from real-time data uses a lot of CPU cycles. |
|
| 231. |
Which of the following uses a lot of CPU cycles?(a) GUI(b) Statically generated graphics(c) Dynamically generated graphics(d) Images |
|
Answer» The correct option is (c) Dynamically generated graphics Explanation: Dynamic graphics for data, means simulating motion or movement using the computer. It may also be thought of as multiple plots linked by time. Dynamically generating graphics from real-time data uses a lot of CPU cycles. |
|
| 232. |
What is the advantage of the code produced graphics being smaller than the images themselves?(a) Bandwidth saving(b) Increase in bandwidth(c) Dynamic advantages(d) Static advantage |
|
Answer» The correct answer is (a) Bandwidth saving To explain I would say: The code used to produce graphics on the client side is typically much smaller than the images themselves, creating substantial bandwidth savings. |
|
| 233. |
What is the advantage for Linux users using R?(a) They get a command sequence to install the particular Linux flavor(b) They get a compiled installer(c) Easily compatible(d) Runtime is less |
|
Answer» The correct choice is (a) They get a command sequence to install the particular Linux flavor Best explanation: Instead of a compiled installer, Linux users get the command sequence to install for their particular Linux flavor. |
|
| 234. |
What are the purposes R can be used for?(a) Suck in data(b) Parse data(c) Process data(d) All of the mentioned |
|
Answer» Correct answer is (d) All of the mentioned Easy explanation: The R language is widely used among statisticians and data miners for developing statistical software and data analysis. Generally, R can be used to suck in data, parse it, process it, and then visualize it for reporting purposes. |
|
| 235. |
What is the default value of the type attribute?(a) text/css(b) text/javascript(c) html(d) xml |
|
Answer» Right answer is (b) text/javascript Easy explanation: The default value of the type attribute is “text/javascript”. You can specify this type explicitly if you want, but it is never necessary. |
|
| 236. |
What is the default value of the asyc attribute?(a) 0(b) 1(c) False(d) True |
|
Answer» Correct answer is (d) True The explanation: The async attribute is a boolean attribute. When present, it specifies that the script will be executed asynchronously as soon as it is available. The async attribute optionally accepts a boolean value and by default holds the value true. |
|
| 237. |
The word “document” mainly refers to ______________(a) Dynamic Information(b) Static Information(c) Both Dynamic and Static Information(d) Temporary information |
|
Answer» The correct choice is (b) Static Information To explain I would say: Some pages present static information and can be called documents. The document is a keyword which is used in selecting any particular element in the document. |
|
| 238. |
Which best explains getSelection()?(a) Returns the VALUE of a selected OPTION(b) Returns document.URL of the window in focus(c) Returns the value of cursor-selected text(d) Returns the VALUE of a checked radio input |
|
Answer» Right choice is (c) Returns the value of cursor-selected text The best I can explain: The Window.getSelection() method returns a Selection object representing the range of text selected by the user or the current position of the caret. The getSelection() method returns the value of the cursor-selected text. |
|
| 239. |
Which method is used to remove a binding?(a) Unbind()(b) removebind()(c) remove(Bind b)(d) unbind() |
|
Answer» Right option is (d) unbind() The explanation is: The unbind() method removes event handlers from selected elements. This method can remove all or selected event handlers, or stop specified functions from running when the event occurs. |
|
| 240. |
How do you find the number with the highest value of x and y?(a) ceil(x,y)(b) top(x,y)(c) Math.ceil(x,y)(d) Math.max(x,y) |
|
Answer» Right option is (d) Math.max(x,y) To elaborate: max function is used for comapring and finding maximum values. It is found in the math library. Math.max(x,y) is used to find the highest value of x and y. |
|
| 241. |
How many static methods does a Date object have?(a) 3(b) 5(c) 4(d) 2 |
|
Answer» Correct choice is (d) 2 Easiest explanation: Date objects are created with the new Date() constructor. The Date object defines two static methods namely Date.parse() and Date.UTC(). |
|
| 242. |
Which method is used to add a binding?(a) binding()(b) add_bind()(c) bind()(d) addbind() |
|
Answer» Right answer is (c) bind() Best explanation: The bind() method creates a new function that, when called, has its this keyword set to the provided value, with a given sequence of arguments preceding any provided when the new function is called. |
|
| 243. |
Which of the following is not the properties of a plug-in entry?(a) name(b) filename(c) mimeTypes(d) value |
|
Answer» The correct option is (d) value Explanation: Plugins are reusable portions of code which help you write even less Javascript to achieve specific features on the client side. Each plug-in has an entry in the array. Each entry has the following properties: name – is the name of the plug-in. filename – is the executable file that was loaded to install the plug-in. description – is a description of the plug-in, supplied by the developer. mimeTypes – is an array with one entry for each MIME type supported by the plug-in. |
|
| 244. |
One of the main advantage of using src attribute is ____________(a) It becomes self-cached(b) It makes the HTML file modular(c) It restricts manipulation in the HTML file(d) It simplifies the HTML files |
|
Answer» Right option is (d) It simplifies the HTML files Explanation: The main advantage of using the src attribute is that it simplifies your HTML files by allowing you to remove large blocks of JavaScript code from them. Hence separate files for css and javascript files are made to make the code modular and readable. |
|
| 245. |
Nested documents inside the HTML documents can be created using ___________(a) frame(b) nest(c) iframe(d) into |
|
Answer» Right option is (c) iframe For explanation I would say: HTML documents may contain nested documents using an iframe element. An iframe creates a nested browsing context represented by a Window object of its own. |
|
| 246. |
How are windows, tabs, iframes, and frames treated according to javascript?(a) They are all browsing contexts(b) They are all browsing information(c) They are all Window contexts(d) They are all Window objects |
|
Answer» The correct option is (d) They are all Window objects Explanation: Client-side JavaScript makes very little distinction between windows, tabs, iframes, and frames they are all browsing contexts, and to JavaScript, they are all Window objects. |
|
| 247. |
What is the code to start displaying the time when the document loads?(a) onload = displayTime;(b) window. = displayTime;(c) window.onload = displayTime;(d) window.onload = start; |
|
Answer» Correct answer is (c) window.onload = displayTime; The explanation: window.onload is used to access the screen while the page is loading. The above code starts displaying the time when the document loads. |
|
| 248. |
How are windows, tabs, iframes, and frames treated according to client-side javascript?(a) They are all browsing contexts(b) They are all browsing information(c) They are all Window contexts(d) They are all Window objects |
|
Answer» Correct choice is (a) They are all browsing contexts To elaborate: Client-side JavaScript makes very little distinction between windows, tabs, iframes, and frames they are all browsing contexts, and to JavaScript, they are all Window objects. |
|
| 249. |
What is the code for getting the current time?(a) now = new Date();(b) var now = new Date();(c) var now = Date();(d) var now = new Date(current); |
|
Answer» Correct answer is (b) var now = new Date(); To explain I would say: Date() is a predefined function in javascript which returns the date in string form. The above code determines the current time and stores it in the variable “now”. |
|
| 250. |
What is the purpose of image replacement?(a) To replace an image(b) To implement special effects(c) Removal of image rollovers(d) Implementation of image rollovers |
|
Answer» Correct answer is (d) Implementation of image rollovers Easy explanation: Image replacement is a technique developed to allow designers to use image-based typesetting while meeting accessibility requirements. One common use for image replacement is to implement image rollovers, in which an image changes when the mouse pointer moves over it. |
|