Intellipaat Back

Explore Courses Blog Tutorials Interview Questions
0 votes
3 views
in Java by (9.5k points)

I want to convert a string from “Your Name” to “your name”. Can anyone tell me how to do this in JavaScript?

1 Answer

0 votes
by (19.7k points)

According to this link, toLowerCase() method returns the calling string value converted to lowercase. The value of the string str remains the same.

const str= 'Your Name';

console.log(str.toLowerCase());

 Output: "your name"

Related questions

0 votes
4 answers
0 votes
1 answer
asked Apr 13, 2021 in Java by sheela_singh (9.5k points)
0 votes
1 answer

31k questions

32.8k answers

501 comments

693 users

Browse Categories

...