I\'m learning how to capitalize the first letter of each word in a string and for this solution I understand everything except the word.substr(1) portion. I see that it\'s a
Just map through if an array set the first letter as uppercase and concatenate with other letters from index 1. The array isn't your case here.
const capitalizeNames = (arr) => { arr.map((name) => { let upper = name[0].toUpperCase() + name.substr(1) console.log(upper) })
}