0

**helpless whimpering noises**

function cypherCode(){ var alphaBet = new Array{"a","b","c"}; for(i=0; i<alphaBet.length; i++){ document.write(alpha.Bet[i]); }; }; cypherCode();

14th Sep 2019, 3:43 PM
Kimi
4 Answers
+ 2
Change your array declaration to var alphaBet = ["a", "b", "c"];
14th Sep 2019, 3:49 PM
Daniel C
Daniel C - avatar
+ 2
Write like this function ds(){ var a=new Array("gh","hdh"); for(var i=0;i<a.length;i++){ document.write(a[i]) } } ds(); You can see where your code is different from my code and change.
14th Sep 2019, 4:00 PM
KfirWe
KfirWe - avatar
+ 1
remove the '.' at 'document.write(alpha.Bet[i]); (this '.' here -> alpha.Bet)
14th Sep 2019, 5:41 PM
Anton Böhler
Anton Böhler - avatar
0
var alphaBet = ["a", "b", "c"]; function cypherCode() { for (i=0; i<alphaBet.length; i++) { document.write(alphaBet[i]); } }; var morealphaBet = ["d", "e", "f"]; https://code.sololearn.com/W3UOF1JOyGdB Array.prototype.push.apply(alphaBet, morealphaBet); cypherCode(); alert(alphaBet.length);
14th Sep 2019, 11:04 PM
Anthony Johnson
Anthony Johnson - avatar