Is there an equivalent to instance_eval in JavaScript?

Thanks,
-John