Go Back   CodingForums.com > :: Client side development > JavaScript programming

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 02-24-2013, 04:53 PM   PM User | #1
underrcurrent
New to the CF scene

 
Join Date: Feb 2013
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
underrcurrent is an unknown quantity at this point
How to write this JavaScript program?

What would the code look like if I wanted to ask a user to input a number, then have a word println to the page that many times. (for the number which was entered). It should be in a function which has a while loop i'm thinking.

For Example:Input the number 5, then the word "hello" will print to the page five times


I appreciate the help all.
underrcurrent is offline   Reply With Quote
Old 02-24-2013, 05:06 PM   PM User | #2
Philip M
Supreme Master coder!

 
Philip M's Avatar
 
Join Date: Jun 2002
Location: London, England
Posts: 17,100
Thanks: 197
Thanked 2,421 Times in 2,399 Posts
Philip M has a spectacular aura aboutPhilip M has a spectacular aura aboutPhilip M has a spectacular aura about
This forum is not a free coding service or homework repository. As a general rule, the people helping out in this forum don't write code for others (especially code that appears to be for homework), but try to help with fixing code that doesn't work. You may perhaps get someone to write this script for you, but you'll be far more likely to get help if you have made a substantial effort and written some code yourself. Then someone here will almost certainly help you correct/improve your work.

There is no such Javascript command as println. That is a Java command. Are you sure you are in the right forum? Java and Javascript are entirely different programming languages, in spite of the confusingly similar names. Rather like Austria and Australia!

Quizmaster: Name an instrument which can be found hanging on the wall in many households.
Contestant: A piano.
__________________

All the code given in this post has been tested and is intended to address the question asked.
Unless stated otherwise it is not just a demonstration.

Last edited by Philip M; 02-24-2013 at 05:08 PM..
Philip M is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

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

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

Forum Jump


All times are GMT +1. The time now is 11:57 PM.


Advertisement
Log in to turn off these ads.