in ,

🧑🏻‍💻 TechAcademy | Active engineers explain how to use Ruby's uniq method and uniq! Method [For beginners]

Active engineers explain how to use Ruby's uniq method and uniq! method [For beginners]

I will explain how to use the uniq method and uniq! method of Ruby.

 
If you're not familiar with Ruby in the first place, you can read the article that explains what Ruby is for a deeper understanding.

This article is based on the contents of the Ruby course of TechAcademy's online boot camp.

 

 

What is the uniq method?

This time I would like to introduce Ruby's uniq method.

The uniq method is a method that deletes duplicate elements in the elements of the array and returns it as the deleted array.

 

What is the uniq! method?

The uniq! method is basically the same as the uniq! method, except that the uniq! method is a destructive method.A destructive method is a method that also modifies the receiver itself.

 

[PR]...

→See more in Tech Tech Magazine