Create Phone Number

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

Write a function that accepts an array of 10 integers (between 0 and 9), that returns a string of those numbers in the form of a phone number.

Example:

The returned format must be correct in order to complete this challenge.
Don’t forget the space after the closing parentheses!

— My Code —

Note:

The following code is not written by me, it was created by another user of codewars.com it belongs to the user: “Jwashton”¬†enjoy it.

 



Copyright 2017. All rights reserved.

Posted December 31, 2016 by Edmundo in category "Ruby Examples