August 17, 2024
JavaScript String To Upper Case
You can convert a string into upper case (all letters in capital letters) with the help of toUpperCase function. The example of toUpperCase method mentioned below:
Code
<html>
<head>
<title>toUpperCase Method Example</title>
</head>
<body>
<script language='JavaScript' type='text/Javascript'>
var greetingStr = 'Good Morning';
var result = greetingStr.toUpperCase();
</script>
</body>
</html>