hello to every one i hope you have a good day :)
i need to define a function, It should accept an array of strings which may contain additional space characters.
the function should use the array map method in order to make a new array full of trimmed names.
i tried something like that but its not close to work unfortunately
function cleanNames(array) {
const trimArray = array.map() function() {
return array.trim();
}
}
trimArray. See developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/…