JavaScript Code

JavaScript String toUpperCase()


String toUpperCase()

toUpperCase()

toUpperCase() method makes a copy of the given string, converts the lowercase characters to uppercase characters, and returns the resulting string.

Example

1. convert string to uppercase

let txt = 'Apple Banana';
let output = txt.toUpperCase();
console.log(output);
//output : APPLE BANANA

Copyright @2022