在Javascript中,有没有办法防止某个函数在某段代码中被调用?我希望确保函数"alert“不会在特定的代码段中被调用。
alert("Hi!"); //this should work normally
var al = alert
//the function "alert" cannot be called after this point
preventFunctionFromBeingCalled(alert, "Do not use alert here: use the abbreviation 'al' in