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 correct answer is D. Why? Now let break it down:
3114
+
3115
+
- `Reflect.has(address, 'author')` gives us `true` given that the object `address` has the key `author`. Simple as it is. So the value of the variable `key` is now `Reflect.ownKeys(address)[0]`, which in fact is the key `name`.
3116
+
3117
+
- `Reflect.set(address, 'language', 'JavaScript');` set another key-value to the object `address`.
3118
+
3119
+
- `Reflect.ownKeys(address).length;` gives us 3 because now it has three keys, so `totalKeys` is now 3.
3120
+
3121
+
- `Reflect.get(address, key).length;` gives us the length of the string `hoccoban.com` which is 12.
3122
+
3123
+
- `Reflect.get(address, 'language').length` is the length of the string `JavaScript`, which is 10.
0 commit comments