File tree Expand file tree Collapse file tree 1 file changed +35
-1
lines changed Expand file tree Collapse file tree 1 file changed +35
-1
lines changed Original file line number Diff line number Diff line change @@ -113,7 +113,7 @@ function logThis() {
113
113
new logThis ();
114
114
```
115
115
116
- - Function
116
+ - logThis { desc: 'logger' }
117
117
118
118
----------------------------------------------------------
119
119
@@ -362,3 +362,37 @@ var b = (a = 3) ? true: false
362
362
- The condition in the ternary is using the assignment operator.
363
363
364
364
----------------------------------------------------------
365
+ #### Q39. For the following class, how do you geet value of 42 from ` x ` ?
366
+
367
+ ``` javascript
368
+
369
+ class X {
370
+ get Y (){return 42 ;}
371
+ }
372
+ var x = new X ();
373
+
374
+ ```
375
+
376
+ - x.Y
377
+
378
+ ----------------------------------------------------------
379
+ #### Q40. What is the result?
380
+
381
+ ``` javascript
382
+
383
+ sum (10 ,20 );
384
+ diff (10 ,20 );
385
+
386
+ function sum (x ,y ){
387
+ return x+ y;
388
+ }
389
+
390
+ let diff = function (x ,y ){
391
+ return x- y;
392
+ }
393
+
394
+ ```
395
+
396
+ - ReferenceError
397
+
398
+ ----------------------------------------------------------
You can’t perform that action at this time.
0 commit comments