You can eliminate shadowed properties with delete
:
delete console.log;
The original log
function (which exists on console
's prototype) was never overwritten -- it has merely been shadowed by a property on the console
instance. You can delete
the instance function and let the original prototype function shine through.