Lab49 Interview Question

How would you build a spy for a javascript object?