Pergunta de entrevista da empresa Lab49

How would you build a spy for a javascript object?