- Strings
- Last updated on
String.prototype.toUpperCase()
Transform all text in a string to uppercase.
let text = 'This sentence has some MIXED CASE LeTTeRs in it.';
// returns "THIS SENTENCE HAS SOME MIXED CASE LETTERS IN IT."
let upper = text.toUpperCase();
See it in action...