I am new at coding and would like to know if the following is correct:
I want to be able to list information repeatedly with the same text added to
it.
Don't know if this is the way to do it, but it prints out OK for me.
Now, in order to get the items listed vertically, I used the 'join' Method
with <br>; is this correct?
The only problem is there is no text after the last value("g"), so I
inserted empty "" marks as the last value.
Is there a better way to do this, w/o the empty value at the end?
Code:
<html>
<body>
<!-- saved from url=(0014)about :internet -->
<script language="JavaS cript" type="text/javascript">
var alphabet = new Array("a","b"," c","d","e","f", "g","");
var Alphabet = alphabet.join(" is a letter of the alphabet.<br>") ;
document.write( Alphabet);
</script>
</body>
</html>
I want to be able to list information repeatedly with the same text added to
it.
Don't know if this is the way to do it, but it prints out OK for me.
Now, in order to get the items listed vertically, I used the 'join' Method
with <br>; is this correct?
The only problem is there is no text after the last value("g"), so I
inserted empty "" marks as the last value.
Is there a better way to do this, w/o the empty value at the end?
Code:
<html>
<body>
<!-- saved from url=(0014)about :internet -->
<script language="JavaS cript" type="text/javascript">
var alphabet = new Array("a","b"," c","d","e","f", "g","");
var Alphabet = alphabet.join(" is a letter of the alphabet.<br>") ;
document.write( Alphabet);
</script>
</body>
</html>
Comment