Skip to content

Latest commit

 

History

History
21 lines (14 loc) · 560 Bytes

printing_array_elements_with_comma_delimeters.md

File metadata and controls

21 lines (14 loc) · 560 Bytes

Description

Input: Array of elements

["h","o","l","a"]

Output: String with comma delimited elements of the array in th same order.

"h,o,l,a"

Note: if this seems too simple for you try the next level

Note2: the input data can be: boolean array, array of objects, array of string arrays, array of number arrays... 😕

My Solution

def printArray(array)
  array.join(',')
end