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.
Calling toUpperCase() on an empty string returns an empty string.
Challenge: Implement safeUpper(str) using toUpperCase.
safeUpper('') // β ''
safeUpper('hi') // β 'HI'