FluffypoopoLvl 55
- iPhone
ackvonhuelio I need to store like 7 things in one thing
ackvonhuelio I need to store like 7 things in one thing
Fluffypoopo
use an array then.
In case you don't know how to do this:
// define the array
var x = [4, 10, true, 16, 21, 'hi', 85];
// print 'hi' (arrays start with 0), x[0] returns the first item in the array, x[1] returns the second, x[2] the third, etc.
console.log(x[5]); // x[5] is 'hi'
// change 16 to 160
x[3] = 160;
// prints 160 instead of 16 because it was changed
console.log(x[3]);
// add 'wassup' to the end of the array
x.push('wassup');
// remove 21 from the array, 21 is 4 in the array
x.splice(4,1); //dont worry about the 1
// veeerrrryyyy important remember arrays start with 0
thats it i think
ackvonhuelio I am going, to be honest, I have not been sleeping, so I'm %90 asleep
Fluffypoopo
hey, i'm not getting payed so i have no requirement to be interesting
I know I am late but
y'know what nevermind it seems you already have things covered here
interesting message
What do you mean by that I was thinking about things outside of code.org. but I realized what site we are on
Brendan i learned that a sprite actually has a useless z variable
i say useless becuase i messed around with it a little and it never did anything.
Unknowing-Thorax
Sprites are objects, so yeah
a sprite also has a
.ofahiufh property,
and a
.whyIsAckvonhuelioAwesome property,
and a
.isThisSpriteAChicken property,
etc.
but they're all undefined
.Whyaregroupssohardtousesometimes property
person
don't use groups, use arrays instead
arrays are like groups without unnecessary bugs and arrays can also hold other values
what the code for it?
In Python it’s x = [] to make an array dunno with Java though. Pretty sure it’s the same
Nxjfjhdhdhdhdnj are you talking about JS or actual Java, in JS yes this would be an acceptable an acceptable form of declaration, however in Java it's not legal because all types of data must be included and are specific to only 1 type of data hence i use a bit more of a specific classification for arrays even when i am faced with a program that does accept more than 1 type of data
Varrience
I am talking about Java. I know it’s not technically legal code because it’s not properly being declared, I just don’t know how to properly declare it in Java…
in javascript or what CDO uses it's
theArray = [value0,value1,value2,etc.];