This section includes 7 InterviewSolutions, each offering curated multiple-choice questions to sharpen your Current Affairs knowledge and support exam preparation. Choose a topic below to get started.
| 1. |
Describe the different kinds of HTTP requests supported by RESTful Web services. |
|
Answer» Each HTTP request type in RESTful web services has a specific purpose. Below is a description of them:
|
|
| 2. |
What is the difference between and ? |
|
Answer» It is true that both the <window.onload> and <onDocumentReady> FUNCTIONS perform tasks when the page has been LOADED in the BROWSER, however, the execution of the two functions differs slightly.
|
|
| 3. |
What is Type Coercion in JavaScript? |
|
Answer» The term type coercion refers to the PROCESS of converting VALUES from one data type to another, either automatically or implicitly. For instance, you could convert a NUMBER to a string, a string to a number, or a boolean to a number, etc. Example: Number to String Conversion <script> // The Number 5 is converted to // string '5' and then '+' // concatenates both strings const VALUE1 = 5; const value2 = '50'; var x = value1 + value2; document.write(x);</script>Output: 550The above example SHOWS how JavaScript converted the number 5 into a string and concatenate the values together, resulting in 550. |
|
| 4. |
State difference between SVG (Scalable Vector Graphics) and Canvas. |
||||||||||
|
Answer» HTML5 introduced two new graphical elements, Canvas (<canvas>) and SVG (<svg>), that make your web pages more interactive and more graphically attractive. Each has its own PROPERTIES and can be used to create graphic elements on web pages.
|
|||||||||||
| 5. |
While building a web application, how do you consider SEO, maintainability, UX, performance, and security? |
|
Answer» Security should be a top priority in any organization that HANDLES VITAL DATA. On the other hand, SEO and UX should be prioritized for small and medium-sized online businesses. You will need to PAY more attention to PERFORMANCE and SEO if you write an online publication. |
|
| 6. |
What do you know about pair programming? |
|
Answer» Pair programming is sometimes REFERRED to as pairing. In pair programming, TWO programmers work together at one (single) workstation. Those who WRITE code are known as drivers, and those who MONITOR and NAVIGATE each line of code are known as navigators. Both of them may switch roles frequently. |
|
| 7. |
Explain DOM (Document Object Model)? |
|
Answer» DOM stands for Document Object Model. It is basically a cross-platform, language-independent API (Application Programming Interface) for XML (Extensible Markup Language) and HTML documents. To put it simply, DOM describes the LOGICAL structure of documents and how one can ACCESS and manipulate them. For example, here is an HTML document that illustrates the DOM hierarchy. These documents are usually treated as a tree structure in which every node is an object that represents a specific part of the document. In a tree, each branch ends with a node, and each node contains objects. The DOM represents the webpage in a hierarchical structure in order for programmers and USERS to navigate it more easily. |
|
| 8. |
Explain HTML5 Web storage. |
|
Answer» HTML5 has many great features, including Web Storage, which is sometimes referred to as DOM storage (Document OBJECT Model Storage). Web applications can use Web Storage to store DATA locally in the browser on the user/client’s side. Data is stored in the form of a key/value pair in the user's browser. Using web storage to store data is similar to using cookies, but web storage is faster and more convenient. Web Storage should never be used to store SENSITIVE data. It isn't "more secure" than cookies since it isn't transmitted over the wire and isn't encrypted. Types of Web Storage: As outlined below, there are two types of web storage with different scopes and lifespans:
|
|
| 9. |
State the difference between span tag and div tag in HTML5. |
||||||||||
|
Answer» Both the div and span tags are used to indicate the PART of a web page. Divs are block-level ELEMENTS, whereas spans are inline elements of a web page. <div> tag is used to show block parts of the webpage whereas <span> tag is used to show inline parts of the webpage: Example: <div>A 6-month online career accelerator program<span>Scaler ACADEMY<span></div>
|
|||||||||||
| 10. |
List out newly introduced input types, APIs, form elements, and elements that support media content in HTML5. |
|
Answer» List out newly introduced input types, APIs, form elements, and elements that support media content in HTML5. HTML5 has been updated repeatedly in the last few years, and the addition of input types has greatly simplified its use. AMONG some of these input types are
HTML5 introduces the following new form elements:
The following are some of the new APIs introduced in HTML5:
HTML5 includes five elements that support media as follows:
|
|
| 11. |
Explain Webpack. |
|
Answer» Webpack is a tool that bundles JavaScript modules, ALSO known as static module bundlers. Modules are REUSABLE chunks of code that are built from the JavaScript, node_modules, images, and CSS styles of your application, and packaged so that they can be easily added to your website. If you have a large number of files, Webpack generates a single (or a few) file that RUNS your application. When Webpack processes your application or package, it generates a dependency graph, which consists of various modules that your webapp needs in order to function as expected. Based on this graph, it then creates a new package that contains only the bare minimum files required, often only ONE or a few bundle.js files which can be easily plugged into the HTML file and used in the application. |
|
| 12. |
What do you mean by ETag (Entity Tag) and how does it work? |
|
Answer» The ETag (entity tag) is a part of the HTTP protocol. This is one of several mechanisms that HTTP provides to validate Web caches, which allows conditional REQUESTS to be made from a browser to resources. Moreover, Etags make SURE that simultaneous updates of the same resource don't overwrite each other (mid-air collisions). ETags are opaque identifiers assigned by a server to a specific version of a resource FOUND at a specific URL. Every time the resource representation at that URL changes, an entirely new ETag is assigned. As such, ETags can be COMPARED in the same way as fingerprints and determine if two representations of a resource are identical. Syntax: ETag: W/"<etag_value>" ETag: "<etag_value>" |
|
| 13. |
Explain CORS (Cross-Origin Resource Sharing) and Write its Importance. |
|
Answer» CORS stands for Cross-origin resource sharing. It is basically defined as a browser MECHANISM that enables web pages from one domain to have controlled access to resources that are located at different domains (cross-domain request). In other words, it allows scripts running on a browser client to interact with and access resources from other origins. It provides and extends flexibility to the SOP (Same-Origin Policy). A same-origin policy restricts a website's ability to access resources outside its source domain. For EXAMPLE, if a JAVASCRIPT app wanted to call an API (Application Programming Interface) running on another domain, it would be blocked and prevented from doing so because of the SOP. Due to restrictions caused by the same-origin policy, CORS was introduced. When a website's CORS policy is set up poorly, it also poses the risk of cross-domain attacks. As such, it cannot prevent cross-origin attacks such as CSRF (Cross-Site Request Forgery). |
|
| 14. |
List the advantages of HTTP/2 over HTTP 1.1. |
|
Answer» Hypertext Transfer Protocol (HTTP) is a set of standard protocols allowing INTERNET users to exchange website knowledge on WWW (World Wide Web). HTTP has gone through four iterations since it was introduced in 1991 i.e., HTTP/0.9, HTTP/1.0, HTTP/1.1, and HTTP/2.0. In 2015, HTTP/2 was released as a major revision to HTTP/1.1. HTTP/2.0 has the following advantages over HTTP/1.1:
|
|
| 15. |
What are the key responsibilities of Web Developers? |
|
Answer» It is generally expected that web developers will be able to perform the following tasks:
|
|