Lab49 interview question

How would you build a spy for a javascript object?