Skip to content

Commit c520394

Browse files
committed
[code] added question
1 parent e3a4d3d commit c520394

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

readme.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,27 @@ alert(run());
124124
new String('a') instanceof String && 'b' instanceof String;
125125
```
126126

127+
* Does `a({}, 'val')` & `b({}, 'val')` will return the same?
128+
```js
129+
var a = function(obj, val) {
130+
obj.val = {
131+
a: 1,
132+
b: 2,
133+
}
134+
135+
return obj;
136+
}
137+
138+
139+
var b = function(obj, val) {
140+
return obj.val = {
141+
a: 1,
142+
b: 2,
143+
}
144+
}
145+
```
146+
147+
127148
## React interview questions
128149
1. What happens when you execute `setState()` in the `render()` method?
129150
1. What is the difference between 'smart and dummy' components?

0 commit comments

Comments
 (0)