459,238 Members | 1,661 Online
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,238 IT Pros & Developers. It's quick & easy.

# Going nuts with random number routine HELP!

 P: n/a Here's what I'm trying to do: I have a string with 30 numbers in it. I want to generate a random number between 0 an 30, go to that position in the string and get that number. Here is the code you can run it and see it doesn't work. I'm new at this (only about a week) but I thought this should work. Please help. It's probably something simple, but I don't see it.

Jul 20 '05 #1

3 Replies

 P: n/a Jim Davidson said:Here's what I'm trying to do:I have a string with 30 numbers in it. I want to generate a randomnumber between 0 an 30, go to that position in the string and get thatnumber. Here is the code you can run it and see it doesn't work. I'mnew at this (only about a week) but I thought this should work. Pleasehelp.It's probably something simple, but I don't see it.

Jul 20 '05 #2

 P: n/a Lee, what can I say...thank you, thank you, thank you! You don't know how long I sat here scratching my head wondering why it wouldn't work Thanks again Lee wrote in message news:... Jim Davidson said:Here's what I'm trying to do:I have a string with 30 numbers in it. I want to generate a randomnumber between 0 an 30, go to that position in the string and get thatnumber. Here is the code you can run it and see it doesn't work. I'mnew at this (only about a week) but I thought this should work. Pleasehelp.It's probably something simple, but I don't see it.

Jul 20 '05 #3

 P: n/a JRS: In article , seen in news:comp.lang.javascript, Jim Davidson posted at Sun, 21 Sep 2003 09:16:10 :- Lines: 81 Lee, what can I say...thank you, thank you, thank you! You don't knowhow long I sat here scratching my head wondering why it wouldn't workThanks againLee wrote in message news:... Jim Davidson said: > >Here's what I'm trying to do: > >I h > ... ... ... Reading the FAQ on the subject would have given you the answer. It would also have guided you in the proper formatting of a Usenet News reply, -- © John Stockton, Surrey, UK. ?@merlyn.demon.co.uk Turnpike v4.00 IE 4 © Jim Ley's FAQ for news:comp.lang.javascript JS maths, dates, sources. TP/BP/Delphi/JS/&c., FAQ topics, links. Jul 20 '05 #4

### This discussion thread is closed

Replies have been disabled for this discussion.