JavaScript String toLowerCase() Method - JavaScript Tutorial

JavaScript String toLowerCase() Method

BLUF: This tutorial on JavaScript String toLowerCase() Method provides an in-depth look at JavaScript's core features. It includes practical examples and code snippets to help you master modern JS development.
Key Discovery: JavaScript String toLowerCase() Method

Understanding JavaScript String toLowerCase() Method is crucial for building dynamic, interactive web applications. Explore the examples below to see it in action.

The toLowerCase function in JavaScript is utilized to transform a string into lowercase letters without altering the original string.

Syntax

The syntax for the toLowerCase method is as follows:

Example

string.toLowerCase()

Return

String in lowercase letter.

JavaScript String toLowerCase Method Example

Let's explore a few basic illustrations showcasing the implementation of the toLowerCase function.

Example 1

In this example, we will display the string using lowercase characters.

Example

<script>

var str = "Example";

document.writeln(str.toLowerCase());

</script>

Output:

Output

Example

Example 2

Here is another illustration demonstrating how to display a string in lowercase.

Example

<script>

var str = "Example tutorials";

document.writeln(str.toLowerCase());

</script>

Output:

Output

Example tutorials

Input Required

This code uses input(). Please provide values below:

Logic Practice
Install Logic Practice
Add to home screen for a faster app-like experience