Hello I am trying to do a simple program. But the basics of this program must have buttons like a calculator. So I was just testing my array and for loop and I can't seem to get anything to show up whatsoever I've tried document.write, alert and so forth. and I can't seem to find my error in the for loop or any syntactic errors. Or even logic errors. I have looked in several books that I have and it seems that everything that I have is fine according to my books. So idk what I am missing, or doing wrong. Could someone please help me figure this out. Here is my code:

      <meta charset = "utf-8">
      <title>Flash Math</title>
	  <script type = "text/javascript">
		var button = new Array (9);
		var buttonString = "";
		for (var i = 0; i < button.lentgh; i++)
			buttonString += button[i] + " ";
			document.write("Calculator" + i);
		<tr> Hello welcome to FLASH MATH!</tr>



have you tried to spell the "lentgh" correctly?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.20 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.