JavaScriptStringtoUpperCase
toLowerCase

toUpperCaseString

trim

Returns the calling string value converted to upper case.

Syntax

str.toUpperCase()

Example

Enter values below to update the example in real time.

const
console
toUpperCase
const text = "hello world";
console.log(text.toUpperCase());   // "HELLO WORLD"