Summary

In this introductory chapter, we analyzed how to work with the array data structure in Ruby and examined three ways to delete items from an array (using the functions delete, delete_at, and delete_if). We examined how Ruby implements the ability to add and remove items from the end of an array using push and pop methods.

We also discussed how to work with the hash data structure, which enables developers to store key/value-based data, and we analyzed how to remove items from a hash. We also walked through how to iterate through a hash. After going through these sections, you must be able to appreciate how flexible the Ruby programming language is when it comes to working with hashes.

We also examined some of the most beneficial methods you can call on hashes for performing various tasks such as adding to a hash, listing all of the keys and values with a single method call, and merging hashes together.

In the next chapter, we'll start looking at conditionals.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.222.109.4