Convert All Array Items to String

Published by Sergei Alexeyev in

Create a function that takes an array of integers and strings, converts integers to strings, and returns the array as a string array.

Examples

ParseArray([1, 2, "a", "b"]) ➞ ["1", "2", "a", "b"]

ParseArray(["abc", 123, "def", 456]) ➞ ["abc", "123", "def", "456"]

ParseArray([1, 2, 3, 17, 24, 3, "a", "123b"]) ➞ ["1", "2", "3", "17", "24", "3", "a", "123b"]

ParseArray([]) ➞ []

Notes

If you get stuck on a challenge, find help in the Resources tab.

Watch a quick demo on how Edabit works.