Series of integers from m to n

From codewars.com by Edxael  (that’s me)

Description:

Write a function generateIntegers/generate_integers that accepts two arguments m/$m and n/$n and generates an array containing the integers from m to n inclusive.

For example, generateIntegers(2, 5)/generate_integers(2, 5) should return [2, 3, 4, 5].

m/$m and n/$n can be any integers greater than or equal to 0.

n/$n will always be greater than or equal to m/$m.

— My Solution —

Note:  The following code is not written by me, it was created by another user of codewars.com it belongs to the user: Carib

x



Copyright 2017. All rights reserved.

Posted January 17, 2017 by Edmundo in category "Ruby Examples