Ruby Data structures; creating arrays

feelo31

Felix Imbanga

Posted on February 28, 2024

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 hash.new 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.

๐Ÿ’– ๐Ÿ’ช ๐Ÿ™… ๐Ÿšฉ
feelo31
Felix Imbanga

Posted on February 28, 2024

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related

ยฉ TheLazy.dev

About