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 = ...
PhilMayor
2 years agoSuper Hero
Did you get any errors in the console?
I think this should be:
var newName = str.slice(0).toUpperCase() + str.slice(1);