Functions as object properties

Report a typo

Select all possible ways to set the function as an object property.

A)

let owl = {
  sound => function() {
    console.log("hoot");
  }
};

B)

let owl = {
  sound: function() {
    console.log("hoot");
  }
};

C)

let owl = {
  sound() {
    console.log("hoot");
  }
};

D)

let owl = {
  sound: {
    console.log("hoot");
  }
};
Select one or more options from the list
___

Create a free account to access the full topic