i am having a problem with java script and need to know how i can convert a integer inputted by the user to asterisks. stipulations i have to use a window prompt dialog box and print the asterisks on the page in a paragraph.. i just need help changing the int to the asterisks.

Recommended Answers

All 2 Replies

You can use prompt() to receive a user input via pop up message box -- see here. If you want to ensure the input as integer, you can force conversion using parseInt(STRING) and the function will return an integer to you.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.