Convert text to uppercase
Give these short labels the same letter case. All four inputs use plain English letters and digits.
toUpperCase
Simple example
Change the case of two letters.
Start'ab'
ResultAB
console.log("ab".toUpperCase());
AB
Advertisements
Everyday examples
Make the bus label match the route board.
Start'bus'
ResultBUS
console.log("bus".toUpperCase());
BUS
Give an art shelf the same lettering as the other shelves.
Start'art'
ResultART
console.log("art".toUpperCase());
ART
Normalize the letters in a ticket code and keep its digits.
Start'b12'
ResultB12
console.log("b12".toUpperCase());
B12