Pedro Campos 03:42 13 Mar 2006

Can someone write a JavaScript program that will prompt for, and accept from the user, an input string which contains at least 8 characters. It should then prompt for, and accept from the user, a numerical value that is no greater than the length of the input string, and should output a version of the input string which takes the form of a string of the same length as the input string but consisting entirely of the letter which occurs in the input string at the position specified by the input number.
For example, if the user inputs the string abracadabra followed by the number 7 then the output should be the string ddddddddddd.
If the user fails to input a sufficiently long string then they should be repeatedly prompted to re-enter a string of an acceptable length. If the user then fails to enter a number that falls within the length of the entered string they should be repeatedly asked to re-enter a number
that falls in the acceptable range. Thank you all

  noddy2121 12:13 13 Mar 2006

click here this should help

click here

hope this helps!!

  Pedro Campos 20:39 13 Mar 2006

thanks for your help, but i really don't see how does a lingerie website could help me with my JavaScript code. I took a look at the source code and I am looking for something simpler.


This thread is now locked and can not be replied to.

Elsewhere on IDG sites

Dell XPS 13 9370 (2018) review

The art of 'British' pulp fiction

Best password managers for Mac

TV & streaming : comment regarder le Tournoi des Six Nations 2018 ?