Navigate back to the homepage

How to convert a string to lowercase in typescript?

Infinitbility
TypeScript
April 16th, 2022 · 1 min read
keep affilitate

Hi Friends 👋,

Welcome to Infinitbility ❤️!

Today, I’m going to show you how to convert string to lowercase in typescript, here we will use the javascript toLowerCase() method to convert to lowercase.

So first, we will create some examples variables, then we use the toLowerCase() method on those variables, and then we will check our console it’s working or not.

Let’s start coding…

1let firstStr: string = 'Hello World';
2let secondStr: string = 'Infinitbility';
3let thirdStr: string = 'IfergUokgIgokr04';
4
5// lets convert it
6firstStr = firstStr.toLowerCase();
7secondStr = secondStr.toLowerCase();
8thirdStr = thirdStr.toLowerCase();
9
10console.log(firstStr, secondStr, thirdStr);

Ok when we run above program, we get all text in lowercase, check following output image.

Output

TypeScript, convert a string case to lowercase example
TypeScript, convert a string case to lowercase example

All the best 👍.

Follow me on Twitter

Join our email list and get notified about new content

No worries, I respect your privacy and I will never abuse your email.

Every week, on Tuesday, you will receive a list of free tutorials I made during the week (I write one every day) and news on other training products I create.

melio affilitate

Looking For React Native Tutorial?

we are trying to create the best Tutorial for react native developers.

When you want a daily updates about React Native Tutorial or infinitbility update subscribe to our newsletter.

Read React Native Tutorial

Request New Tutorial or Article on mail [email protected]

Guide book

Guidebook: The Javascript Monorepo Photoshop Guide

Tutorials

Categories

More articles from Infinitbility

How to convert any to string in typescript?

TypeScript, convert any to string example.

April 14th, 2022 · 1 min read

How to convert object to json string in typescript?

TypeScript, convert object to json string example.

April 14th, 2022 · 1 min read
© 2020–2022 Infinitbility
About
Link to $https://medium.com/infinitbilityLink to $https://www.facebook.com/InfinitbilityLink to $https://github.com/infinitbilityLink to $https://twitter.com/infinitbilityLink to $https://www.buymeacoffee.com/infinitbilityLink to $mailto:[email protected]