入力した単語を文字の数だけ繰り返すプログラムを作成しようとしています。いくつかの異なる方法を試しましたが、うまくいきませんでした。ここまでの作業です。
<html>
<head>
<title>Repeat Word</title>
<script type="text/javascript">
//Program: Repeat Word
//Purpose: Repeat word for as many times as it has characters
//Date last modified: 4/11/12
var word = "";
word = prompt("Enter the word you would like repeated?")
</script>
</head>
<body>
</form>
</body>
</html>
こんにちはのために繰り返したいことの例は...
Enter a word: Hello
Hello
Hello
Hello
Hello
Hello