I am trying to convert an array of numbers to an array of strings and get the first character in each element of the array. Tell me what I am doing wrong that I get "0" and not "-" in the last element?
function example
function invert(array) {
let q = array.map(i => i.toString()[0])
}
invert([-10,8,-2,-0])
result Array(4) [ "-", "8", "-", "0" ]