A JavaScript program to capitalize the first letter of each word in a given string – I don't understand this line of code
I'm new to JS. I've written a program that capitalizes the first letter of each word in a given string. I also found another piece of code on w3resource.com that does the same, but I don't quite understand how it…