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.
| 251. |
Which of the following are the features of an HTTP request?(a) URL being requested(b) Optional request body(c) Optional set of request headers(d) All of the mentioned |
|
Answer» The correct choice is (d) All of the mentioned The explanation is: An HTTP request consists of four parts : the HTTP request method or “verb” the URL being requested an optional set of request headers, which may include authentication information an optional request body |
|
| 252. |
What are the properties supporting CSS styles for a document element?(a) style and font(b) style and className(c) size and style(d) className and font |
|
Answer» Correct option is (b) style and className To explain 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. firstChild returns the first child node as an element node, a text node or a comment node (depending on which one’s first). |
|
| 253. |
Which of the below does not belong to the Render Engine workflow?(a) Paint DOM elements(b) Parse Content(c) Build DOM nodes in render tree(d) Parse identifiers |
|
Answer» Correct option is (d) Parse identifiers To elaborate: A rendering engine is software that draws text and images on the screen. All of the mentioned belongs to the Render Engine workflow. The Render engine workflow contains: Parse Content Build DOM nodes in render tree Layout positioning of DOM elements Paint DOM elements. |
|
| 254. |
According to the workflow of a runtime logging, what happens after calculating the run time?(a) Display to screen(b) Log to server(c) Either Display to screen or Log to server(d) Server to log |
|
Answer» The correct answer is (c) Either Display to screen or Log to server Best explanation: According to the workflow of a runtime logging, after calculating the run time, decision boxes are kept that will check to either display to the debug screen or log to the server. |
|
| 255. |
Which of the following shows a better runtime performance for coalescing functionality, using functions, and using objects?(a) Firefox unwoundfun(b) Firefox UsingFunct(c) Firefox UsingObject(d) Firefox UsingStruct |
|
Answer» The correct answer is (b) Firefox UsingFunct Easy explanation: When we compare the runtime performance for coalescing functionality, using functions, and using objects, the Firefox UsingFunct shows better performance. UsingFunct improves runtime performance and inturn the user experience. |
|
| 256. |
What is the purpose of the adoptNode() method?(a) Removes node(b) Makes it ready for insertion(c) Removes node and Makes it ready for insertion(d) Changes the node |
|
Answer» The correct answer is (c) Removes node and Makes it ready for insertion Best explanation: This method removes the node from whatever document it is currently part of and changes its ownerDocument property to this document, making it ready for insertion into this document. The adoptNode() method adopts a node from another document. The adopted node can be of all node types. |
|
| 257. |
What is the purpose of the product Minify?(a) Storing the data(b) Streamlining the data(c) Proxies the JavaScript file(d) Loading the data |
|
Answer» Correct option is (c) Proxies the JavaScript file The explanation: Minify proxies the JavaScript file; the script tag on the page points to Minify, which is a PHP file. |
|
| 258. |
Which of the following is used to run ad hoc R commands?(a) R Console(b) R Primer(c) Both R Console and R Primer(d) R timer |
|
Answer» Correct option is (a) R Console To explain I would say: Interactive data analysis usually occurs on the R console that executes commands as you type them. R Console is a command-line environment for running ad hoc R commands. |
|
| 259. |
What is the purpose of the Script tab?(a) To edit the coding(b) To run on multiple servers(c) To run more complex tests(d) To run media |
|
Answer» The correct choice is (c) To run more complex tests To explain: The Script tab can be used to run more complex tests that involve multiple steps including navigate to multiple URLs, etc. |
|
| 260. |
Which of the following is the order of Minify process?(a) Remove extraneous characters, gzip the response, Read(b) Remove extraneous characters, Read, gzip the response(c) Read, Remove extraneous characters, gzip the response(d) Read, gzip, extract, remove |
|
Answer» Correct answer is (c) Read, Remove extraneous characters, gzip the response Easy explanation: To minify JS, CSS and HTML files, comments and extra spaces need to be removed, as well as crunch variable names so as to minimize code and reduce file size. Minify reads in the content, decorates it by way of removing extraneous characters, and gzips the response. |
|
| 261. |
Which program code doesn’t need preprocessing before being run?(a) Text(b) Script(c) Both Text and Script(d) Comment |
|
Answer» The correct option is (b) Script The best I can explain: A scripting or script language is a programming language for a special run-time environment that automates the execution of tasks. A script is program code that doesn’t need pre-processing (e.g. compiling) before being run. |
|
| 262. |
What is the purpose of the Auth tab in the testing platform?(a) To specify credentials(b) To authorize a page(c) To run the test(d) To run user access |
|
Answer» The correct answer is (a) To specify credentials To explain: In the Auth tab you can specify credentials to use if the web site uses HTTP authentication for access. |
|
| 263. |
Which of the following is mandatory to run before running YSlow?(a) WebPageTest(b) FireBug(c) Both WebPageTest and FireBug(d) Mozilla |
|
Answer» Right answer is (b) FireBug Explanation: YSlow analyzes web page performance by examining all the components on the page, including components dynamically created by using JavaScript. It is mandatory to run FireBug before running YSlow. |
|
| 264. |
Firebug can be used to inspect ___________(a) HTML(b) CSS(c) DOM(d) All of the mentioned |
|
Answer» Correct option is (d) All of the mentioned Best explanation: Firebug is an extension for the Mozilla Firefox browser that allows you to debug and inspect HTML, CSS, the Document Object Model (DOM) and JavaScript. In addition to debugging web pages, Firebug was used for web security testing and web page performance analysis. |
|
| 265. |
How many rules are there in the YSlow version 2.0?(a) 23(b) 21(c) 27(d) 33 |
|
Answer» Right choice is (a) 23 The explanation: There are totally 23 rules in the ruleset of YSlow (V2) namely : Minimize HTTP Requests Use a Content Delivery Network Avoid empty src or href Add an Expires or a Cache-Control Header Gzip Components Put StyleSheets at the Top Put Scripts at the Bottom Avoid CSS Expressions Make JavaScript and CSS External Reduce DNS Lookups Minify JavaScript and CSS Avoid Redirects Remove Duplicate Scripts Configure ETags Make AJAX Cacheable Use GET for AJAX Requests Reduce the Number of DOM Elements No 404s Reduce Cookie Size Use Cookie-Free Domains for Components Avoid Filters Do Not Scale Images in HTML Make favicon.ico Small and Cacheable |
|
| 266. |
Which of the following is not a feature of the User Interface?(a) Skinnable Interface(b) Resizable Side Panel(c) Fixed Side Panel(d) Menu options |
|
Answer» Right option is (c) Fixed Side Panel To elaborate: The features present in the User Interface are: Port of Firebug’s Visual Object Representation (aka Reps) Recreation of Firebug 1.3 User Interface with pixel precision Menu options Resizable Side Panel Skinnable Interface |
|
| 267. |
How many properties are there in the interface PerformanceTiming?(a) 21(b) 22(c) 23(d) 24 |
|
Answer» Correct option is (a) 21 For explanation I would say: Performance.timing read-only property returns a PerformanceTiming object containing latency-related performance information. There are a total of 23 properties associated with the interface PerformanceTiming. |
|
| 268. |
What is the purpose of the property PerformanceTiming.navigationStart?(a) Ready to end the navigation(b) Ready to jump the navigation(c) Ready for navigation(d) Ready to changing the navigation |
|
Answer» Right answer is (c) Ready for navigation To explain I would say: The PerformanceTiming.navigationStart read-only property returns an unsigned long long representing the moment, in milliseconds since the UNIX epoch, right after the prompt for unload terminates on the previous document in the same browsing context. If there is no previous document, this value will be the same as: PerformanceTiming.fetchStart. |
|
| 269. |
Which of the following layer retrieves the content from the network?(a) Transport Layer(b) Application Layer(c) Network Layer(d) Physical Layer |
|
Answer» Right option is (c) Network Layer Explanation: The network layer is the third level of the Open Systems Interconnection Model (OSI Model) and the layer that provides data routing paths for network communication. The network layer retrieves the content from the network. |
|
| 270. |
How many constant values can the property type be represented?(a) 2(b) 3(c) 4(d) 5 |
|
Answer» Correct option is (c) 4 Explanation: The type property sets or returns the value of the type attribute of an |
|
| 271. |
What is the usage of the keyword ?? in R?(a) Help window(b) Extensive search(c) Error correction(d) Error detection |
|
Answer» Right answer is (b) Extensive search The explanation: The ?? function scans the documentation for packages installed in your library. ?? (keyword) is generally used for a more extensive search when compared to the keyword ?. |
|
| 272. |
Which of the following handles painting the content on to the screen?(a) Rendering engine(b) JavaScript Interpreter(c) UI Layer(d) Network Layer |
|
Answer» Right answer is (a) Rendering engine To elaborate: A rendering engine is a software that draws text and images on the screen. The rendering engine handles painting the content to the screen. When it encounters JavaScript, it hands it off to the JavaScript interpreter. |
|
| 273. |
Which of the following gives the high level breakdown of memory usage?(a) about:memory(b) memory(c) about-memory(d) about::memory |
|
Answer» Right option is (a) about:memory Explanation: The Memory column represents native memory. DOM nodes are stored in native memory. If this value is increasing, DOM nodes are getting created. Typing about:memory into the location bar brings up a page that gives a high-level breakdown of memory usage. |
|
| 274. |
What is the function of the memory object?(a) Gets unused memory details(b) Shows optimization(c) Gets memory usage(d) Memory optimization |
|
Answer» The correct option is (c) Gets memory usage To elaborate: The JavaScript Memory column represents the JS heap. This column contains two values. The value you’re interested in is the live number (the number in parentheses). The memory object is a feature of Chrome that allows us to see the memory usage that Chrome is taking up while running our page. |
|
| 275. |
What can be done to monitor the memory usage?(a) Profiling(b) Sequencing(c) Serializing(d) Serializing & Sequencing |
|
Answer» Correct answer is (a) Profiling The best explanation: Garbage collected languages help developers manage memory by periodically checking which previously allocated pieces of memory can still be “reached” from other parts of the application. Profiling allows us to monitor our memory usage. |
|
| 276. |
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 tasks |
|
Answer» The correct answer is (b) Describe particular task To elaborate: In computer programming, an application programming interface is a set of subroutine definitions, communication protocols, and tools for building software. An API may describe the ways in which a particular task is performed. |
|
| 277. |
Which character in JavaScript code will be interpreted as XML markup?(a) !(b) >(c) &(d) . |
|
Answer» Right option is (c) & To elaborate: If your JavaScript code contains the < or & characters, these characters are interpreted as XML markup. Element tags must begin with the < character, and entities and character references in an XML document must begin with the & character. |
|
| 278. |
Which of the following is a way of embedding Client-side JavaScript code within HTML documents?(a) From javascript:encoding(b) External file specified by the src attribute of a “script” tag(c) By using a header tag(d) By using body tag |
|
Answer» The correct answer is (b) External file specified by the src attribute of a “script” tag For explanation: The Client-side JavaScript code is embedded within HTML documents in four ways : Inline, between a pair of “script” tags From an external file specified by the src attribute of a “script” tag In an HTML event handler attribute, such as onclick or onmouseover In a URL that uses the special javascript: protocol. |
|
| 279. |
Which form of event propagation handles the registered container elements?(a) Event Propagation(b) Event Registration(c) Event Capturing(d) Default Actions |
|
Answer» Right option is (c) Event Capturing Explanation: Event bubbling and capturing are two ways of event propagation in the HTML DOM API. With bubbling, the event is first captured and handled by the innermost element and then propagated to outer elements. With capturing, the event is first captured by the outermost element and propagated to the inner elements. |
|
| 280. |
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 quickly |
|
Answer» Right answer is (a) Browser doesn’t release memory from objects unnecessary For explanation I would say: Memory leaks happen when your code needs to consume memory in your application, which should be released after a given task is complete but isn’t. Memory leak happens when the browser for some reason doesn’t release memory from objects which are not needed any more. |
|
| 281. |
The lexical scooping in JavaScript is based on which of the following?(a) Segments(b) Blocks(c) Functions(d) Entire code |
|
Answer» Right option is (c) Functions To explain: Lexical scoping (sometimes known as static scoping) is a convention used with many programming languages that sets the scope (range of functionality) of a variable so that it may only be called (referenced) from within the block of code in which it is defined. JavaScript has lexical scoping based on functions but not blocks. |
|
| 282. |
Which of the following attribute takes the source of the PHP file?(a) img(b) src(c) source(d) psrc |
|
Answer» The correct answer is (b) src For explanation: Php file is used an scripting language for backend development. The syntax to referencing a PHP file using external JavaScript is consistent enough with what we already know: |
|
| 283. |
When does JavaScript code appear inline within an HTML file?(a) Between the “script” tag(b) Outside the “script” tag(c) Between or Outside the “script” tag(d) Between the header tag |
|
Answer» Correct option is (a) Between the “script” tag To elaborate: JavaScript code can appear inline within an HTML file between the “script” tags. Javascript can also be included from an external file specified by the src attribute of a “script” tag. |
|
| 284. |
To which of the following object does the print() method belong to?(a) window(b) document(c) hash(d) string |
|
Answer» Right option is (a) window The best explanation: The method print() belongs to the window object. The print() method opens the Print Dialog Box, which lets the user to select preferred printing options. |
|
| 285. |
Which of the following is not considered as an error in JavaScript?(a) Syntax error(b) Missing of semicolons(c) Division by zero(d) Missing of Bracket |
|
Answer» Right option is (c) Division by zero Easiest explanation: Division by zero is not an error in JavaScript: it simply returns infinity or negative infinity. There is one exception, however: zero divided by zero does not have a well defined value, and the result of this operation is the special not-a-number value, printed as NaN. |
|
| 286. |
What kind of path can the PHP file be?(a) Absolute(b) Relative(c) Either Absolute or Relative(d) Both Absolute and Relative |
|
Answer» The correct answer is (c) Either Absolute or Relative Best explanation: The PHP code is enclosed in special start and end processing instructions that allows you to jump into and out of “PHP mode”. The PHP file is either an absolute or relative path to a PHP script instead of the usual .js file. |
|
| 287. |
What are the processes that take place within R?(a) Splitting of data(b) Aggregating of data(c) Overlaying two or more data(d) All of the mentioned |
|
Answer» Right choice is (d) All of the mentioned Explanation: R is an integrated suite of software facilities for data manipulation, calculation and graphical display. Within R, processing the data, splitting it, averaging it, aggregating it, overlaying two or more data sets, and then from with R, a chart that depicts the data out is done. |
|
| 288. |
What is the parameter of the method getElementsbyTagName() if we need to get an image?(a) image(b) src(c) img(d) imageurl |
|
Answer» Right choice is (c) img Explanation: To get the source attribute the parameter is src. The method must look like getElementsbyTageName(“img”) if we need to get an image. |
|
| 289. |
Which property lays the element according to the normal flow?(a) relative(b) absolute(c) fixed(d) static |
|
Answer» Right answer is (a) relative For explanation: When the position property is set to relative, an element is laid out according to the normal flow, and its position is then adjusted relative to its position in the normal flow. |
|
| 290. |
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); |
|
Answer» Correct choice is (a) user_pref(“javascript.console.open_on_error”, true); Explanation: The prefs.js file, located in the profile folder, is used by Firefox and other Mozilla-based applications to store settings. For instance, when you create a new e-mail account in Thunderbird, the account name and server settings will be stored in the prefs.js file in your Thunderbird profile folder. The code : |
|
| 291. |
Which network allows you to distribute static assets like images, etc?(a) Content Delivery Network(b) Content Receiving Network(c) System Area Network(d) Local area network |
|
Answer» Correct choice is (a) Content Delivery Network To explain I would say: A content delivery network (CDN) allows you to distribute your static assets like images, JavaScript files and stylesheets to geographically distributed servers. This gets the content of your page to your user’s browser faster. |
|
| 292. |
What is the procedure to view the console in the Firefox?(a) Tools -> Error Console(b) Tools -> Error Window(c) Help -> Error Console(d) Tools -> Bug window |
|
Answer» Correct choice is (a) Tools -> Error Console The best I can explain: The error icon option can be enabled in the Tools. To view the console, select Tools –> Error Console or Web Development. |
|
| 293. |
What is the parameter of the method Date.parse()?(a) date(b) string(c) datestring(d) string |
|
Answer» The correct answer is (c) datestring To explain: The parse method is defined as Date.parse(datestring). The parse() method parses a date string and returns the number of milliseconds between the date string. |
|
| 294. |
Which of the following can be used to select HTML elements based on the value of their name attributes?(a) getElementByName()(b) getElementsByName()(c) getElementsName()(d) getElementName() |
|
Answer» The correct choice is (b) getElementsByName() For explanation: The getElementsByName() method returns a collection of all elements in the document with the specified name (the value of the name attribute), as a NodeList object. |
|
| 295. |
What is the other way of calling the Error Console in Firefox?(a) Error Window(b) JavaScript Console(c) JavaScript Window(d) Error or JavaScript Window |
|
Answer» Right option is (b) JavaScript Console The explanation: The browsers like Firefox, Netscape and Mozilla send error messages to a special window called the JavaScript Console or Error Console. The Error Console is also termed as the JavaScript Console. |
|
| 296. |
Which function is used to start the time logging?(a) startTimeLogging()(b) start()(c) Loggingstart()(d) startLogging() |
|
Answer» The correct choice is (a) startTimeLogging() To explain: The function startTimeLogging() is used to start the time logging. The startTimeLogging() method captures the timing data for ad hoc, etc for referencing an uncached document.location. |
|
| 297. |
The object has three object attributes namely ________(a) Class, parameters, object’s extensible flag(b) Prototype, class, objects’ parameters(c) Prototype, class, object’s extensible flag(d) Native object, Classes and Interfaces and Object’s extensible flag |
|
Answer» Correct answer is (c) Prototype, class, object’s extensible flag Explanation: Every object has three associated object attributes: An object’s prototype is a reference to another object from which properties are inherited. An object’s class is a string that categorizes the type of an object. An object’s extensible flag specifies whether new properties may be added to the object. |
|
| 298. |
To determine whether one object is the prototype of (or is part of the prototype chain of) another object, one should use the ____________(a) isPrototypeOf() method(b) equals() method(c) === operator(d) ==opertor |
|
Answer» Right option is (a) isPrototypeOf() method To explain I would say: Prototype is a global property which is available with almost all the objects. To determine whether one object is the prototype of (or is part of the prototype chain of) another object, one should use the isPrototype() method. To find out if p is the prototype of o write p.isPrototypeOf(o). |
|
| 299. |
Which of the following are static methods in JavaScript?(a) Date.parse()(b) Date.UTC()(c) Both Date.parse() and Date.UTC()(d) Date.clear() |
|
Answer» Correct answer is (c) Both Date.parse() and Date.UTC() To explain I would say: Date objects are created with the new Date() constructor. Date.parse() parses a string representation of a date and time and returns the internal millisecond representation of that date. Date.UTC() Returns the millisecond representation of the specified UTC date and time. |
|
| 300. |
A linkage of series of prototype objects is called as ________(a) prototype stack(b) prototype chain(c) prototype class(d) prototypes |
|
Answer» Right option is (b) prototype chain Easy explanation: Consider an example, Date.prototype inherits properties from Object.prototype, so a Date object created by new Date() inherits properties from both Date.prototype and Object.prototype. This linked series of prototype objects is known as prototype chain. |
|