capitalize all strings in an array javascript code example
Example 1: capitalize first letter in array of strings javascript
for(var i = 1 ; i < newArr.length ; i++){
newArr[i].charAt(0).toUpperCase();
Example 2: javascript capitalize array
const names = ['Ali', 'Atta', 'Alex', 'John'];
const uppercased = names.map(name => name.toUpperCase());
console.log(uppercased);
// ['ALI', 'ATTA', 'ALEX', 'JOHN']