(Original post by emmakola)
Yes it is, when you have to pass the correct sound into the array. I know you do  but I can't remember how you call the array
I'm not quite clear what you mean by '
call the array
'? Do you mean read an item of data from it? or add an item of data into it? or change an item at a position?
(nitpick: The word 'call
' usually means 'do a thing
' or 'execute an instruction
' -- for example you'll often read/hear people say 'call a function
' meaning running/executing the code inside that function.. so that doesn't really make sense with an array, which is just a list of items -- The kinds of things you'd normally do with an array would be: add/remove an item, modify (overwrite/change) some existing item, read an item, read its length, etc. )
Anyway, an array has a name just like any other variable. In fact, an array works just like a list-of-variables.
The only extra thing you need to do is add the square-brackets and your position number to the end, and then you can do all the normal things that you'd do with any other variable. e.g. https://repl.it/repls/FeminineExperiencedDecimals
var myArray = [ "dog", "cat", "bird" ];
myArray = "fish";
The name of the array on its own means 'the complete array' (so the name of the array helps you do things like access/add/remove an item or get its length). The square brackets [ ] are for selecting a specific position, so you need the number for that position.
the square brackets can use just a plain number for the position - e.g 
, or they can be given another variable which contains a number (Like the 'counter' which you'd use in a "for"
-loop -- e.g. [ i ]
Last edited by winterscoming; 3 months ago