- TypeScript Tutorial
- TypeScript - Home
- TypeScript - Overview
- TypeScript - Environment Setup
- TypeScript - Basic Syntax
- TypeScript - Types
- TypeScript - Variables
- TypeScript - Operators
- TypeScript - Decision Making
- TypeScript - Loops
- TypeScript - Functions
- TypeScript - Numbers
- TypeScript - Strings
- TypeScript - Arrays
- TypeScript - Tuples
- TypeScript - Union
- TypeScript - Interfaces
- TypeScript - Classes
- TypeScript - Objects
- TypeScript - Namespaces
- TypeScript - Modules
- TypeScript - Ambients
- TypeScript Useful Resources
- TypeScript - Quick Guide
- TypeScript - Useful Resources
- TypeScript - Discussion
TypeScript - Number toLocaleString()
This method converts a number object into a human readable string representing the number using the locale of the environment.
Syntax
number.toLocaleString()
Return Value
Returns a human readable string representing the number using the locale of the environment.
Example
var num = new Number(177.1234); console.log( num.toLocaleString());
On compiling, it will generate the same code in JavaScript.
The code will produce the following output −
177.1234
typescript_numbers.htm
Advertisements
To Continue Learning Please Login
Login with Google