Skip to content

Commit 6f6112e

Browse files
author
Sebastiano Manzella
committed
new javascript linkedin assessment question
1 parent aa295c0 commit 6f6112e

File tree

1 file changed

+35
-1
lines changed

1 file changed

+35
-1
lines changed

README.md

Lines changed: 35 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ function logThis() {
113113
new logThis();
114114
```
115115

116-
- Function
116+
- logThis { desc: 'logger' }
117117

118118
----------------------------------------------------------
119119

@@ -362,3 +362,37 @@ var b = (a = 3) ? true: false
362362
- The condition in the ternary is using the assignment operator.
363363

364364
----------------------------------------------------------
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+
----------------------------------------------------------

0 commit comments

Comments
 (0)