Forum Discussion
CrystalRyan-96e
2 years agoCommunity Member
Transform learner name to proper case
I'm trying to write some JavaScript that will convert the learner's first name to proper case. I was able to successfully get it to convert to all uppercase using the following code:
var player = ...
RichardWatson
2 years agoSuper Hero
Crystal,
I'm not a Javascript person, but hopefully, Walt will see this and respond. In the meantime, here is one approach that seems to work for me that uses a submit button. Walt may have a better one.
Richard
- CrystalRyan-96e2 years agoCommunity Member
Thanks! This worked for capitalizing the first letter, but didn't work if someone had for example: jAne or JANE. It would convert respectively to, JAne and JANE.
Do you have any ideas on how this could be modified to correct the name regardless of what combination of uppercase and lowercase has been used?
Thanks again for your response!