We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 0398f2f + 8931769 commit 5aeba4cCopy full SHA for 5aeba4c
code-snippets/hoisting.md
@@ -217,6 +217,31 @@ foo();
217
</details>
218
219
</li>
220
+
221
+---
222
223
+<li>
224
225
+**What will be the output ?**
226
227
+```JS
228
+function animal(){
229
+ console.log("Cat");
230
+}
231
232
+var otherAnimal;
233
234
+animal();
235
+otherAnimal();
236
237
+otherAnimal = function() {
238
+ console.log("Dog");
239
240
+```
241
242
+- A: `Cat Dog`
243
+- B: `Cat undefined`
244
+- C: `Cat TypeError: otherAnimal is not a function`
245
246
---
247
@@ -246,10 +271,12 @@ console.log(a,b);
271
<summary><b>Answer</b></summary>
272
<p>
248
273
274
+#### Option: C
249
275
#### Option: A
250
276
251
277
</p>
252
278
253
279
280
+</li>
254
281
255
-</ol>
282
+</ol>
0 commit comments