Answers for "this ....object of."

0

this ....object of.

const myObj = {
  name: 'John',
  age: 25,
  place: 'London',
  myFunction: function() {
    return this;
  }
};

myObj.myFunction(); 
// {name: "John", age: 25, place: "London", myFunction: ƒ()}
Posted by: Guest on April-14-2022

Code answers related to "Javascript"

Browse Popular Code Answers by Language