JavaScript String.prototype.toUpperCase() Explained with Examples

JavaScript String.prototype.toUpperCase() Explained with Examples
0

The JavaScript method .toUpperCase() returns the same string it was called on, but in all upper case.

Syntax

str.toUpperCase()

Examples

console.log("hello world".toUpperCase()); // Console will output "HELLO WORLD"

Source MDN

2 Likes