-3

Lets say i have this code:

function GetParentObject(fn){
   //get parent object from function

}

var obj = GetParentObject(eval); //returns window

How do i implement GetParentObject function?

kanemete
  • 13
  • 8

1 Answers1

0

This is where this comes in.

The this keyword returns the object that owns the function where it is called.

Wais Kamal
  • 5,442
  • 2
  • 14
  • 28