Originariamente inviato da esacerbare
3) Perché se scrivo:
codice:
<html><head>
<title>Listing 8-3</title>
</head>
<body>
<script type="text/javascript"> 
function interrompi() {
while (x>0) {
if (x>3)
break;
x++;
}
return x;
document.write(x);
}
</body></html>
Il browser non mi visualizza nulla!?!?!
Non c'è nessuno che ti chiami interrompi() ed anche se ci fosse, la funziona fa il return prima del write().