# toString()

A method that returns a readable text representation of an object.

## What does **toString()** do in JavaScript?

**toString()** — A method that returns a readable text representation of an object.

```javascript
const orderNumber = 2048;
const text = orderNumber.toString();
```

Level: Apprentice · [More JavaScript terms at this level](https://www.ask-codey.com/glossary/subjects/javascript/apprentice)

Updated: September 27, 2026

## In other subjects

- [ToString() in C#](https://www.ask-codey.com/glossary/tostring-c-sharp)
- [toString() in Java](https://www.ask-codey.com/glossary/tostring)

Source: https://www.ask-codey.com/glossary/tostring-javascript
