[Javascript] How can I convert a string to all upper case?


I want to convert a string to all uppercase, How to do that in Javascript?

1 Answer

3 years ago by

toUpperCase() method is used to convert a string to all upper case.

Check the below example for usage:

let str ="Hello, World!";

console.log(str.toUpperCase());

Run here https://onecompiler.com/javascript/3xns6xg48

3 years ago by Meera