Navigate back to the homepage

How to convert number to string in typescript?

Infinitbility
TypeScript
October 28th, 2021 · 1 min read
How to convert number to string in typescript?

Hello Friends 👋,

Welcome To Infinitbility! ❤️

TypeScript haven’t any new or specific way to convert number to a string , we have to do the same like javascript.

JavaScript provide multiple way to convert number to string, we can use toString(), toLocaleString().

let see how we can use javascript number to string conversion ways in typescript.

toString()

1let y: number = 32;
2let x: string = y.toString(); // '32'

toLocaleString()

1let y: number = 32;
2let x: string = y.toLocaleString(); // '32'

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.

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

Tutorials

Categories

More articles from Infinitbility

How to convert string to array in typescript?

How to convert string to array in typescript?

Example of string to array conversion in typescript

October 28th, 2021 · 1 min read
How to convert string to number in typescript?

How to convert string to number in typescript?

Example of string to number conversion in typescript

October 28th, 2021 · 1 min read
© 2020–2021 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]