JavaScript Glossary: String toLowerCase()

Publikováno: 26.3.2019

Basics

The toLowerCase() String method converts a string object to lower case. The return value of the method is the value of the calling string in lower case.

Celý článek

Basics

The toLowerCase() String method converts a string object to lower case. The return value of the method is the value of the calling string in lower case.

"yeaH Yeah YEAH yaaaaS".toLowerCase();
//"yeah yeah yeah yaaaas"

https://scotch.io/embed/gist/722fee9a63a17bc590ef482763ebcaf2

Syntax

const lowerCaseString = string.toLowerCase()

0 Parameters

Returns a string

This method returns the calling string value in lower case.

Common Uses and Snippets

Convert two separate strings to lowercase and compare

Converting a string to lowercase when attempting comparison of two separate strings.

https://scotch.io/embed/gist/1e345a3081841fa75d065bdffef14fab

Nahoru
Tento web používá k poskytování služeb a analýze návštěvnosti soubory cookie. Používáním tohoto webu s tímto souhlasíte. Další informace