Skip to content

Instantly share code, notes, and snippets.

@sgml
Created November 10, 2019 21:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sgml/87a681e2cb000aa528e171e5310bed85 to your computer and use it in GitHub Desktop.
Save sgml/87a681e2cb000aa528e171e5310bed85 to your computer and use it in GitHub Desktop.
var x = 2;
var y = 8;
var a = function(b) { return function(c) { return x + y + Math.abs(b) + c; } };
// Statement will go here
Object.defineProperty(Math, 'random', {get() { return function(){ return 0; }}})
var fn = a(x);
x = 4;
console.log(fn(Math.random() * 10));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment