arrays

+2 william appiah-dankwah · June 10, 2014
i have made an array witch i want to try and use other statements i have learnt to finish of the code, hears my code what can i add to it to make it more interesting 

var gold = new Array();

gold[0] = "goddfellaz";
gold[1] = "sk vibemakers"
gold[2] = "heartless crew"
gold[3] = "rolldeep"
gold[4] = "wolfpack"
gold[5] = "payasyougo"

Post a Reply

Replies

- page 4
Oldest  Newest  Rating
0 Sho Carter · April 4, 2015
Please be specific by stating which context you mean....
Are you talking about looping through the images (in the array) you first posted, or are you talking about looping over the images over a few seconds (Interval)?

And yes, I code thank you. 
0 william appiah-dankwah · April 4, 2015
have you written a code that works in a loop over a few second interval?? i am talking about my image array post the loop is not working did you notice that?
0 Sho Carter · April 5, 2015
Of course i noticed that, and that's because of syntax errors, and in my code, you can add another image in the array, and loop over that....quite straight forward actually, and yes, it can also run over a loop over a few second interval...i can do that too, but depends on if it's what you wanted.
0 oluseyi obafemi · April 5, 2015
Provide a function called findWordSize that takes as arguments an array of String
and a number (length of word) and returns -1 if the a word of length equal to the
number, provided in the argument, is not found; otherwise returns the index of the
word which has length equal to number provided in the argument.
For example if the array is {“Program”, “Array”, “Code”, “Algorithm”, “Loop”} and the
number argument is 5, then the function will return 1, which corresponds to the
position of the word “Array” which is of length 5. Can anyone help to write the code for this question please. Cheers
0 william appiah-dankwah · April 6, 2015
is the syntax error 

var Name = new Array();

Object[0] = new Image();
Object[1] = "pic/image.jpg"

0 Sho Carter · April 6, 2015
There's error in that yes, because Object isn't defined., and you haven't placed a semi-colon at the end of Object[1] line
0 william appiah-dankwah · April 6, 2015
seriously were ever you are you don't code you who carter your going to have to think about really explaining
0 Sho Carter · April 7, 2015
....Hi William, that's quiet an immature statement. I'll leave you with this screen shot below: (and if you don't understand it, I'd suggest you run through the JavaScript tutorials again, and read this: http://eloquentjavascript.net/ )

/images/forum/upload/2015-04-07/23e9081d1e23e85e4111ca9842f3bd25.png




/images/forum/upload/2015-04-07/6be898e8bcdb307a646f0ec0de08345f.png
0 william appiah-dankwah · April 7, 2015
are you ok? do you know how the loop works? well i can't complain its my code. Your right though there is a syntax error
0 Idonije Stephen · April 8, 2015
good day friends. i am new here.
please i have an assignment and i am confused as to what to do.
how can i Implement a Stack as an Array?


please i need the code and a brief tutorial if possible
:angel:

Javascript

107,232 followers
About

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

Links
Moderators