What, if anything, is wrong with each of the following snippets of code? Will each one run? Is it likely to behave as intended?
var i; for (i = 0; i < 10; i++);
alert (i);
for (var i = 0; i < 10; ) { alert (i); i++ }
var i = 10; for ( ; i > 0; i--) alert (i);;
var paid;
/* ... here some code which
sets a value for paid ... then: */
if (paid = true) sendReceipt (customer);