Re: Javascript - sequence of events -
06-05-2006
, 08:01 AM
JRS: In article <1149448415.070252.284350 (AT) i40g2000cwc (DOT) googlegroups.com>
, dated Sun, 4 Jun 2006 12:13:35 remote, seen in
news:comp.lang.javascript, bboyle18 (AT) gmail (DOT) com posted :
One should seek and read a newsgroup FAQ, and read the group for a
while, before posting to the group.
Had you done so, you would probably have realised that posted code
should be executable as received, and therefore that you should not
permit your posting agent to line-wrap it; and, partly to help there,
you should replace tab-indenting with indenting by 2-3 spaces.
Math.round(Math.random()...) is rarely good, though it may not matter
in this case - see FAQ 4.22 - OTOH, your "pennies" range looks like
1..100.
parseInt(yr) should normally have a second parameter, though in this
case it probably does not matter; however, unary + would be better (and
maybe can be used instead of parseFloat too).
If you use a function, rather than a string of code, as the first
parameter of setTimeout, it may not always work.
Note for future reference FAQ 2.3 para 7.
--
© John Stockton, Surrey, UK. ?@merlyn.demon.co.uk Turnpike v4.00 IE 4 ©
<URL:http://www.jibbering.com/faq/> JL/RC: FAQ of news:comp.lang.javascript
<URL:http://www.merlyn.demon.co.uk/js-index.htm> jscr maths, dates, sources.
<URL:http://www.merlyn.demon.co.uk/> TP/BP/Delphi/jscr/&c, FAQ items, links. |