Simple type conversion in arrays using map
· ☕ 1 min read
Type conversion is a big deal, but not anymore? Just use maps against a given array and them conversion shortcuts to simplify type conversion in Javascript.
Consider the below array -
1 const nums = [1, 3, 5, 7, 9]; We can convert the type to string using a map.