help with code

+1 william appiah-dankwah · March 9, 2015
i am trying to get this loop to work with this array i have put in an object literal i dont know what to do help needed.

var Yellow = {

say: function(){

var Can = new Array();

Can[0]  = "Blue";
Can[1] = "Green";

for(var i = 0; i < 10; i++){

document.getElementById('Plane').innerHTML = i[1];

}
}
};
Yellow.say();
































Post a Reply

Replies

- page 2
Oldest  Newest  Rating
0 william appiah-dankwah · March 19, 2015
nice mr doug fresh!?! what problem would i have run into with this basic code? the code is supposed to display the whole content  of the array one the loop is executed. why should i write comments in the forum uv worked out how iv written the code. 
  • 1
  • 2

Javascript

107,189 followers
About

A scripting language that is added to standard HTML to create interactive effects, apps, games for the browser.

Links
Moderators