Convert an Array to a String

Published by Caleb Miller in

Create a function that takes an array of numbers or letters and returns a string.

Examples

array_to_string([1, 2, 3, 4, 5, 6]) ➞ "123456"

array_to_string(["a", "b", "c", "d", "e", "f"]) ➞ "abcdef"

array_to_string([1, 2, 3, "a", "s", "dAAAA"]) ➞ "123asdAAAA"

Notes

N/A

Watch a quick demo on how Edabit works.