How to change a String's Case in JavaScript
const str = 'John swana'
str.toUpperCase()
// 'JOHN SWANA'
String.toLowerCase turns strings to their small letters or 'lowerCase'
const strr = "Lorem ipsum"
strr.toLowerCase()
// lorem ipsum
Numbers are not converted, they remain constant, untouched and unchanged.
'65'.toLowerCase()
// '65'
Comments
Post a Comment