JSFiddle - React, Tailwind, and code Playground

JavaScript

var originalFunction = Math.max;

Math.max = function(){
    // DO SPY STUFF HERE
    alert("max called");
    
    return originalFunction.apply(this, arguments);
};


alert(Math.max(1,2,3,4));