Javascript Reference - JavaScript String toUpperCase() Method








toUpperCase() converts string to upper case.

The toUpperCase() method does not change the original string.

Browser Support

toUpperCase() Yes Yes Yes Yes Yes

Syntax

stringObject.toUpperCase();

Parameters

None.

Return Value

A string converted to uppercase.

Example


var stringValue = "hello world"; 
console.log(stringValue.toUpperCase());

The code above generates the following result.