You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- The values of an object can be obtained using `Object.values` which returns an array of values
112
88
@@ -140,8 +116,7 @@ for(let key in obj){
140
116
141
117
<br />
142
118
143
-
#### Q4
144
-
### Write a function which can check if a given object is empty or not
119
+
### Q. Write a function which can check if a given object is empty or not
145
120
146
121
- Object is empty if it has no keys
147
122
- Few objects such as `Date` object does not have any keys but still are not empty. Hence additional check can be implemented to verify the stringification of the object is also empty
@@ -163,8 +138,7 @@ function isObjectEmpty(obj){
163
138
164
139
<br />
165
140
166
-
#### Q5
167
-
### Create an empty object which has no prototype attached to it
141
+
### Q. Create an empty object which has no prototype attached to it
168
142
169
143
- Objects created in JavaScript will have a prototype object on it connected to other object or `Object`
170
144
- Object constructor can be used to create such an empty object
### Show how inheritance works in Class and the use of super keyword with working example
465
+
### Q. Show how inheritance works in Class and the use of super keyword with working example
504
466
505
467
- Class level inheritance can happen when a class inherits from another class using the keyword `extends`
506
468
- The child class can access parent class members using the keyword `super`
@@ -553,8 +515,7 @@ component.addValues(9, -4, 6, 2); // Sum of 9,-4,6,2 is 13
553
515
554
516
<br />
555
517
556
-
#### Q18
557
-
### Show the way of using Proxy for object
518
+
### Q. Show the way of using Proxy for object
558
519
559
520
- The Proxy object enables create a proxy for another object, which can intercept and redefine fundamental operations for that object
560
521
- Proxy can be set for objects (including functions and arrays) to intercept the values which gives us the control on access and modification of the real object
@@ -590,8 +551,7 @@ There are lot of other traps used in Proxy apart from `get`, `set`, `apply`
590
551
591
552
<br />
592
553
593
-
#### Q19
594
-
### Show how can we use for..of loop to iterate on a range with given start and end values in an object
554
+
### Q. Show how can we use for..of loop to iterate on a range with given start and end values in an object
0 commit comments