The code is from the solutions. This is the only one I understand, but where does the L come from? I understand about arrow notation, that one was feature in ES6. I just don’t understand what the ‘L’ means here. Is this similar to an [i] in for loops for example?
I think I’m beginning to suspect the area of your confusion. Perhaps it is the -replace- function that is confusing you actually.
The way replace works here is it takes every letter in the str and it applies the pattern to it and if the pattern gives a match then it will pass that letter into the arrow function. The arrow function then produces an uppercase letter which is used to replace the original letter.
I had around half of the code correct. I missed a few of the parameters present inside of the regex and I didn’t know exactly how to use the .toUppercase() this way. I just didn’t really understand what the L stood for in the solution.