Is there a way to get the default value of an object in the global scope?
For example, let's say that I need to use Math.round, but Math.round has been overwritten with another value. Here's an example of what I'm talking about:
// script1.js (can't be edited)
Math.round = () => null;
Object.freeze(Math); // delete Math.round method and freeze Math object
// script2.js (loads after script1.js)
console.log(Math.round(3.141592)); // should return 3
Is it possible to get the default value that the browser sets (function round() { [native code] }) after it is overwritten in Javascript?