HighDots Forums  

Re: Javascript - sequence of events

Javascript JavaScript language (comp.lang.javascript)


Discuss Re: Javascript - sequence of events in the Javascript forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Dr John Stockton
 
Posts: n/a

Default 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.

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.