The toUpperCase() method converts a string to uppercase letters.
The toUpperCase() method does not change the original string.
Code:-
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<body>
<h1>toUpperCase()</h1>
<input type="button" onclick="strfun();" value="Get Answer">
<script>
function strfun()
{
var str = "good company";
alert(str.toUpperCase());
}
</script>
</body>
</html>
How to use toUpperCase in JavaScript:- Geniusofstudent
Reviewed by
Network security
on
July 02, 2019
Rating:
5
No comments: