String.prototype.toLowerCasebeginner'HELLO World'.toLowerCase() // β 'hello world'
'ABC'.toLowerCase() // β 'abc'
'XYZ123'.toLowerCase() // β 'xyz123'Use toLowerCase() to convert all alphabetical characters in a string to lowercase.
str.toLowerCase() returns a new string with all letters converted to lowercase.
Challenge: Implement lower(str) that converts a string to lowercase.
lower('HELLO') // β 'hello'
lower('WORLD') // β 'world'