Hi everyone, I am using the for loop function. I feel that my code is correct but something is wrong. I check for brackets and semicolon and they are in the right places and the right amount.
Can someone look at my code and let me know why it is not displaying/functioning. I am using the decrement operator with the for loop.
This code should make my code look like
1
2
etc
[code] function ForTest()
{
var OutPut=””;
FillArray()
for (var i=Numbers.length; i >= 0; i–)
{
OutPut = OutPut + Numbers[i] + “r”;
}
document.frmMain.txtaOutput.value = OutPut;
}
and I also tried it this way
[code]function ForTest()
{
var OutPut=””;
FillArray()
{
for (var i = Numbers.length – 1; i >= 0; i–);
{
OutPut = OutPut + Numbers[i] + “r”;
}
document.frmMain.txtaOutput.value = OutPut;
}
}
neither way is making my document work.