I wrote this code:
String.prototype.toJadenCase = function () {
return this.split(/\s/).map(word => word[0].toUpperCase() + word.substr(1)).join(' ')
}
let text = 'hello world'
text.toJadenCase()
alert(text) // hello world
And it doesn't change the value of string, from that function called is. As I saw here: String prototype changing the string value , it should work, but it doesn't
Thanks for all the help!