The toUpperCase() method is used to change, a given string into uppercase.
string.toUpperCase()
The toUpperCase()
method attaches to the right side of a string and returns the exact string, but the character in the string is turned into uppercase.
const text = 'scaN SkilL';
console.log(text.toUpperCase()); // Prints: SCAN SKILL
The toUpperCase()
, method like the name suggests changes text to uppercase.