Manipulation of window.alert()

The following code was executed:

<script>
var originalAlert = window.alert;   

function wrongAlert(message) { 
   output = "I report most obediently: " + message;
   originalAlert(output);
}

window.alert = wrongAlert;

alert("Nothing to report!");
</script>