JS interview Question/ Answers Set – 2

JS interview Question/ Answers Set – 2

Event Bubbling is a type of event propagation in which one element is nested inside a second element, and both elements have registered a handle to that event. This process starts with the element that triggers the event and then bubbles up to the containing elements in the hierarchy. The event is first captured and handled by the innermost element and then successfully propagated to outer elements. Thus, when an event happens on an element, it first runs the handlers on it, then on its parent, then all other ancestors.
Content Delivery Network (CDN) is an interconnection of computer systems globally, and it contains cache files for users to access. It enables users to access the content quite fast by duplicating or caching the content optimally stored on multiple servers and then directing them according to the proximity. Some of the advantages of using CDN are as follows:
  1. Faster delivery of content.
  2. Less load frequency across pages.
  3. Low latency and infatuation rate with little packet loss.
  4. Highest bandwidth-saving ability.
  5. Best analytics usage report.
  6. Secure content storage.
There are two widely used CDNs with jQuery:
  • Microsoft: Used to load from jQuery AJAX CDN
  • Google: Used to load jQuery from the Google Libraries API
Type coercion refers to the conversion of a value from one type to another (e.g Number to String, String to Number, or Boolean to Number) with similar content. In case the behavior of the implicit conversion is not sure, then the constructors of a data type can be used to convert any value to that datatype.
Webpack is a static module bundler for JavaScript. It is a build tool that is used is to bundle JavaScript files for usage in a browser. It puts the bundles of assets, such as codes, images, fonts, and files in a dependency graph, and enables you to use require () in your source code to point to local files, like images, and decide how they’re processed in the final JavaScript bundle.

Post Your Comments & Reviews

Your email address will not be published. Required fields are marked *

*

*