For a simple harmless example that is more representative of a common JavaScript newbie mistake than a malicious script, try running this and see how well you like it
for (var i = 0; i < 1000; i++) {
alert(i);
}
My bet is you close your browser or stop scripts well before it completes.