DEV Community

Cover image for Ruby Data structures; creating arrays
Felix Imbanga
Felix Imbanga

Posted on • Updated on

Ruby Data structures; creating arrays

Today I was doing the codeacademy lessons on ruby. I worked on arrays and iterators today. I learned that you can access by index within arrays. I also learned a little bit about hash iterators and literal notation. I learned that using a method vs literal notation basically comes down to personal preference as the difference in time between the two is minute. Key's and values are really important in hashes and that ruby is able to distinguish between the two within a loop.

Iterating through an array of an array requires nested loop and I also need to make sure I put strings within hashes in "" otherwise I'll have issues with my code.

Top comments (0)