How to Get String Convert to Lowercase in Javascript?
In this post, we will learn javascript string tolowercase() method. I would like to show you convert javascript string to be all lowercase. This article goes in detailed on how to convert string to lowercase in javascript?. you'll learn how to convert a string to lowercase in javascript. You just need to some step to done how to remove special characters from a string in javascript?.
To convert a string to lowercase in JavaScript, you can use the built-in `toLowerCase()` method. Here's an example:
Example 1:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>How to Get String Convert to Lowercase in Javascript? - NiceSnippets.Com</title>
</head>
<body>
</body>
<script type="text/javascript">
let myString = "HELLO WORLD";
let lowerCaseString = myString.toLowerCase();
console.log(lowerCaseString); // Output: hello world
</script>
</html>
In this example, we declare a variable `myString` with the value "HELLO WORLD". We then call the `toLowerCase()` method on this string and store the result in a new variable called `lowerCaseString`. Finally, we log the value of `lowerCaseString` to the console, which outputs "hello world".
- How to set Date in setUTCHours() Method in JavaScript?
- How to Date sets UTC milliseconds in Javascript?
- How to Use push(), unshift(),pop() and shift() With Array in Javascript?
- How to Check if a Variable is a Number in Javascript?
- How To Format a Number Using Fixed - Point Notation in Javascript?
- How to Insert an Element into an Array in javaScript?
- How to remove duplicate elements from JavaScript Array?
- How to calculate years, months and days between two dates in javascript?