# split()

*noun*

say it: **“SPLIT”** **/splɪt/**

A JavaScript string method that cuts text into an array of pieces wherever a separator appears, such as 'Ana,Ben,Cy'.split(',').

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

**split()** — Breaks a string into a list of pieces.

```javascript
const words = "tea coffee".split(" ");
const label = words.join(" & ");
```

## In a sentence

- “I used **split**(',') to turn the line of runner names into a list I could loop over.”

Level: Apprentice · [More JavaScript terms at this level](https://www.ask-codey.com/glossary?category=javascript&level=2)

Updated: November 9, 2026

## In other subjects

- [Split() in C#](https://www.ask-codey.com/glossary/split-c-sharp)
- [split() in Python](https://www.ask-codey.com/glossary/split)

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