In Ruby, If we need to add two integers we can simply use
6 + 8
Another approach is using method invoking and passing arguments

We are using .(Dot which is also called period) to invoke +( Plus method ) and sending 8 as argument.
Similarly for Ruby Array

Comments
Post a Comment