Return Home
<script text="text/javascript">
alert("Hello");
var alert = 2;
alert("World");
</script>

The above script is interestingly flawed. The first line is fine and runs as expected, by alerting the word "Hello."

However in the second line, the function of alert that was just used successfully is changed to a variable called alert and given a integer value of 2. What's interesting is that this over-rides the alert functionality just used, and subsequently throws an error because by the last line the functionality of alert is broken, because alert is now a variable, and is no longer a function that can trigger an alert again.