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