Hi I am working on array and made some good improvement into my code. Now I am just having one problem.
I want the number to display in my text box area starting from 0 to 1000
I know how to do it for alert but not to display in a downward order like

0
1
2
3
4
5
6
7
8
9
10
etc

in my text box area, can someone look at my code and let me know what to do to replace my alert. So that it can display the list of numbers instead of only one number. Please be easy on me I am a beginner and have an old brain.

var Numbers = new Array();
var LastNumber = new Array();


function WhileTest()
{FillArray()
{i = 0;
{while (i < LastNumber) {
  alert([i]);
document.frmMain.txtaOutput.value = (i) + "\n"
  i = i + 1;
}
}
}
}

function FillArray()
{
	Numbers = 0;
   	if (document.frmMain.txtLastNumber.value >= "0")
   	{ 
   	LastNumber = document.frmMain.txtLastNumber.value; 
   	}
   	alert (LastNumber);
   	}

I figured it out. I did the game of elemination and played around with some string until ching ching it worked

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.