0

I feel like I've been learning about arrays long enough to know what they may be used for

Can you please give me some examples?

17th Jun 2017, 1:12 AM
AJ Sellarole
AJ Sellarole - avatar
1 Odpowiedź
+ 1
im not sure about ruby specifically but arrays in general are Extremely helpful. I usr them every day at work to store objects. the entry level things you learn on here are making arrays of integers and strings ect. but they are so much more useful than that. you could create an object containing alot of information fields then add this object to the array keeping it for later use. what I do is in java. I use a thing called ArrayList its a built on dynamic array. and is extremely helpful I would fex: query a table for specific users who have done x. this would return a list of users I iterate through thr list and create a user object for each row in the result once the object is complete I add it to the list then I return the list once the result is finished. I can then iterate through this array again and display all of these users. arrays are so useful. id highly encourage doing some work with them a project or something. I've used a 3-Dimentional array before in javascript. it was pretty cool if you have more questions please dont hesitate to ask. hope this helps!!
18th Jun 2017, 6:00 AM
Michael Szczepanski
Michael Szczepanski - avatar