Skip to content

Commit 853df66

Browse files
committed
Update README.md
1 parent 5fe55c4 commit 853df66

1 file changed

Lines changed: 28 additions & 28 deletions

File tree

‎README.md‎

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -7687,7 +7687,7 @@ myContentType = myRequest.headers.get('Content-Type'); // returns 'image/jpeg'
76877687
76887688
<br/>
76897689
7690-
## Q. What is the difference between ES6 Map and WeakMap?
7690+
## Q 16.1. What is the difference between ES6 Map and WeakMap?
76917691
76927692
**Map:**
76937693
@@ -7751,7 +7751,7 @@ The latest Chrome, Firefox, Edge and Safari support Map and WeakMap on desktop.
77517751
<b><a href="#">↥ back to top</a></b>
77527752
</div>
77537753
7754-
## Q. What is the difference between Set and WeakSet in ES6?
7754+
## Q 16.2 What is the difference between Set and WeakSet in ES6?
77557755
77567756
**Set:**
77577757
@@ -7829,7 +7829,7 @@ weakSet.add(2); // ERROR, no primitive value
78297829
<b><a href="#">↥ back to top</a></b>
78307830
</div>
78317831
7832-
## Q. List down the collection of methods available on WeakSet?
7832+
## Q 16.3. List down the collection of methods available on WeakSet?
78337833
78347834
Below are the list of methods available on WeakSet,
78357835
@@ -7859,7 +7859,7 @@ weakSetObject.delete(secondObject);
78597859
<b><a href="#">↥ back to top</a></b>
78607860
</div>
78617861
7862-
## Q. List down the collection of methods available on WeakMap?
7862+
## Q 16.4. List down the collection of methods available on WeakMap?
78637863
78647864
Below are the list of methods available on WeakMap,
78657865
@@ -7889,7 +7889,7 @@ weakMapObject.delete(secondObject);
78897889
<b><a href="#">↥ back to top</a></b>
78907890
</div>
78917891
7892-
## Q. What is an Iterator?
7892+
## Q 16.5. What is an Iterator?
78937893
78947894
An iterator is an object which defines a sequence and a return value upon its termination. It implements the Iterator protocol with a `.next()` method which returns an object with two properties:
78957895
@@ -7928,7 +7928,7 @@ console.log(number.next()); // {value: 30, done: false}
79287928
79297929
<br/>
79307930
7931-
## Q. What is modules in ES6?
7931+
## Q 17.1. What is modules in ES6?
79327932
79337933
Making objects, functions, classes or variables available to the outside world is as simple as exporting them, and then importing them where needed in other files.
79347934
@@ -7988,7 +7988,7 @@ export class Alligator {
79887988
79897989
<br/>
79907990
7991-
## Q. Describe the Revealing Module Pattern in javascript?
7991+
## Q 18.1. Describe the Revealing Module Pattern in javascript?
79927992
79937993
Revealing module pattern is a design pattern, which let you organise your javascript code in modules, and gives better code structure. It gives you power to create public/private variables/methods (using closure), and avoids polluting global scope
79947994
@@ -8035,7 +8035,7 @@ myModule._privateMethod(); // TypeError: protected by the module closure
80358035
<b><a href="#">↥ back to top</a></b>
80368036
</div>
80378037
8038-
## Q. How do you detect javascript disabled in the page?
8038+
## Q 18.2. How do you detect javascript disabled in the page?
80398039
80408040
You can use `<noscript>` tag to detect javascript disabled or not. The code block inside `<noscript>` get executed when JavaScript is disabled, and are typically used to display alternative content when the page generated in JavaScript.
80418041
@@ -8052,7 +8052,7 @@ You can use `<noscript>` tag to detect javascript disabled or not. The code bloc
80528052
<b><a href="#">↥ back to top</a></b>
80538053
</div>
80548054
8055-
## Q. What is the difference between feature detection, feature inference, and using the UA string?
8055+
## Q 18.3. What is the difference between feature detection, feature inference, and using the UA string?
80568056
80578057
**1. Feature Detection**
80588058
@@ -8088,7 +8088,7 @@ This is a browser-reported string that allows the network protocol peers to iden
80888088
<b><a href="#">↥ back to top</a></b>
80898089
</div>
80908090
8091-
## Q. What is strict mode?
8091+
## Q 18.4. What is strict mode?
80928092
80938093
The Strict Mode is allows you to place a program, or a function, in a `strict` operating context. This strict context prevents certain actions from being taken and throws more exceptions.
80948094
@@ -8116,7 +8116,7 @@ The Strict Mode is allows you to place a program, or a function, in a `strict` o
81168116
<b><a href="#">↥ back to top</a></b>
81178117
</div>
81188118
8119-
## Q. Describe Singleton Pattern In JavaScript?
8119+
## Q 18.5. Describe Singleton Pattern In JavaScript?
81208120
81218121
The **singleton pattern** is a type of creational pattern that restricts the instantiation of a class to a **single** object. This allows the class to create an instance of the class the first time it is instantiated; however, on the next try, the existing instance of the class is returned. No new instance is created.
81228122
@@ -8168,7 +8168,7 @@ console.log(obj2 === obj1); // true
81688168
<b><a href="#">↥ back to top</a></b>
81698169
</div>
81708170
8171-
## Q. What do you understand by ViewState and SessionState?
8171+
## Q 18.6. What do you understand by ViewState and SessionState?
81728172
81738173
**1. Session State**:
81748174
@@ -8194,7 +8194,7 @@ On the other hand is information specific to particular web page. It is stored i
81948194
<b><a href="#">↥ back to top</a></b>
81958195
</div>
81968196
8197-
## Q. Explain browser console logs features?
8197+
## Q 18.7. Explain browser console logs features?
81988198
81998199
The `Console` method **log()** outputs a message to the web console. The message may be a single string or it may be any one or more JavaScript objects.
82008200
@@ -8237,7 +8237,7 @@ Output
82378237
<b><a href="#">↥ back to top</a></b>
82388238
</div>
82398239
8240-
## Q. What are the difference between console.log() and console.dir()?
8240+
## Q 18.8. What are the difference between console.log() and console.dir()?
82418241
82428242
* `console.log()` prints the element in an HTML-like tree
82438243
Output
@@ -8253,7 +8253,7 @@ Output
82538253
<b><a href="#">↥ back to top</a></b>
82548254
</div>
82558255
8256-
## Q. How to Copy Text to Clipboard?
8256+
## Q 18.9. How to Copy Text to Clipboard?
82578257
82588258
```html
82598259
<!-- The text field -->
@@ -8284,7 +8284,7 @@ function copy() {
82848284
<b><a href="#">↥ back to top</a></b>
82858285
</div>
82868286
8287-
## Q. What is a service worker?
8287+
## Q 18.10. What is a service worker?
82888288
82898289
A Service worker is basically a JavaScript file that runs in background, separate from a web page and provide features that don\'t need a web page or user interaction.
82908290
@@ -8370,7 +8370,7 @@ self.addEventListener('fetch', function(event) {
83708370
<b><a href="#">↥ back to top</a></b>
83718371
</div>
83728372
8373-
## Q. How do you manipulate DOM using service worker?
8373+
## Q 18.11. How do you manipulate DOM using service worker?
83748374
83758375
Service worker can\'t access the DOM directly. But it can communicate with the pages it controls by responding to messages sent via the `postMessage` interface, and those pages can manipulate the DOM.
83768376
@@ -8439,7 +8439,7 @@ self.addEventListener("message", function(event) {
84398439
<b><a href="#">↥ back to top</a></b>
84408440
</div>
84418441
8442-
## Q. How to use Web Workers in javascript?
8442+
## Q 18.12. How to use Web Workers in javascript?
84438443
84448444
**Step 01: Create a Web Workers file**: Write a script to increment the count value.
84458445
@@ -8525,7 +8525,7 @@ w = undefined;
85258525
<b><a href="#">↥ back to top</a></b>
85268526
</div>
85278527
8528-
## Q. What are the restrictions of web workers on DOM?
8528+
## Q 18.13. What are the restrictions of web workers on DOM?
85298529
85308530
WebWorkers do not have access to below javascript objects since they are defined in an external files
85318531
@@ -8537,7 +8537,7 @@ WebWorkers do not have access to below javascript objects since they are defined
85378537
<b><a href="#">↥ back to top</a></b>
85388538
</div>
85398539
8540-
## Q. What is rendering in JavaScript?
8540+
## Q 18.14. What is rendering in JavaScript?
85418541
85428542
JavaScript-powered content needs to be rendered before it can output meaningful code and be displayed for the client.
85438543
These are the different steps involved in the JavaScript rendering process:
@@ -8633,7 +8633,7 @@ Painting can be global or incremental (similar to layout):
86338633
<b><a href="#">↥ back to top</a></b>
86348634
</div>
86358635
8636-
## Q. What is the difference between HTMLCollection and NodeList?
8636+
## Q 18.15. What is the difference between HTMLCollection and NodeList?
86378637
86388638
**HTMLCollection**
86398639
@@ -8685,7 +8685,7 @@ element.appendChild(text);
86858685
<b><a href="#">↥ back to top</a></b>
86868686
</div>
86878687
8688-
## Q. What is a trampoline function? What is it used for?
8688+
## Q 18.16. What is a trampoline function? What is it used for?
86898689
86908690
The trampoline is just a technique to optimize **recursion** and prevent `stack-overflow` exceptions in languages that don't support tail call optimization like Javascript ES5 implementation. However, ES6 will probably have support for tail call optimization.
86918691
@@ -8768,7 +8768,7 @@ Using a trampoline is obviously less performant than simple recursion, since you
87688768
<b><a href="#">↥ back to top</a></b>
87698769
</div>
87708770
8771-
## Q. What is throttling and debouncing in javascript?
8771+
## Q 18.17. What is throttling and debouncing in javascript?
87728772
87738773
Debouncing and throttling techniques are used to limit the number of times a function can execute. These are two widely-used techniques to improve the performance of code that gets executed repeatedly within a period of time.
87748774
@@ -8805,15 +8805,15 @@ $(window).on('resize', _.debounce(function() {
88058805
<b><a href="#">↥ back to top</a></b>
88068806
</div>
88078807
8808-
## Q. What is same-origin policy?
8808+
## Q 18.18. What is same-origin policy?
88098809
88108810
The same-origin policy is a policy that prevents JavaScript from making requests across domain boundaries. An origin is defined as a combination of URI scheme, hostname, and port number. If you enable this policy then it prevents a malicious script on one page from obtaining access to sensitive data on another web page using Document Object Model(DOM).
88118811
88128812
<div align="right">
88138813
<b><a href="#">↥ back to top</a></b>
88148814
</div>
88158815
8816-
## Q. What is server-sent events?
8816+
## Q 18.19. What is server-sent events?
88178817
88188818
Server-sent events (SSE) is a server push technology enabling a browser to receive automatic updates from a server via HTTP connection without resorting to polling. These are a one way communications channel - events flow from server to client only. This is been used in Facebook/Twitter updates, stock price updates, news feeds etc.
88198819
@@ -8840,7 +8840,7 @@ Below are the list of events available for server sent events
88408840
<b><a href="#">↥ back to top</a></b>
88418841
</div>
88428842
8843-
## Q. How do you get the image width and height using JS?
8843+
## Q 18.20. How do you get the image width and height using JS?
88448844
88458845
You can programmatically get the image and check the dimensions(width and height) using Javascript.
88468846
@@ -8856,8 +8856,8 @@ img.src = 'http://www.google.com/intl/en_ALL/images/logo.gif';
88568856
<b><a href="#">↥ back to top</a></b>
88578857
</div>
88588858
8859-
#### Q. What is optional chaining in javascript?
8860-
#### Q. How could you make sure a const value is garbage collected?
8859+
#### Q 18.21. What is optional chaining in javascript?
8860+
#### Q 18.22. How could you make sure a const value is garbage collected?
88618861
88628862
*ToDo*
88638863

0 commit comments

Comments
 (0)