JS Coding Questions Logo
JS Coding Questions
#71🎯 Exercise💻 Code

JavaScript Coding Exercise 71

Advertisement

728x90
javascript
1const user = {
2
3name: "John",
4
5eat() {
6
7console.log(this);
8
9var eatFruit = function () {
10
11console.log(this);
12};
13
14eatFruit();
15},
16};
17
18user.eat();

Choose the correct output:

A
{name: "John", eat: f}, {name: "John", eat: f}
B
Window {...}, Window {...}
C
{name: "John", eat: f}, undefined
D
{name: "John", eat: f}, Window {...}

Advertisement

Responsive Ad
71of86