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