Hello if someone could help me with my code? I know there are many solutions I can find out from others topics but I don’t want to spoil myself…
just need to know why “typeError: mot.toLowerCase() is not a function” in my code:
var mot = "";
function majMin(mot){
var minuscule = mot.toLowerCase();
var separeLettre = minuscule.split("");
var maj = minuscule[0].toUpperCase();
var motPropre = minuscule.replace(minuscule[0],maj);
return motPropre;
}
var str = "";
function titleCase(str) {
var tableau = str.split(" ");
return majMin(tableau.length);
}
titleCase("bOnJour jE vous Remercie poUr votre Aide");
thanks for your help !