# split in JavaScript

`split`

Given the string `'1-2-3-4-5'`. Use the `split` method to write each number in this string into a separate array element.

Given the string `'12345'`. Use the `split` method to write each character of this string into a separate array element.

Given the following array:

`let arr = [1, 2, 3, 4, 5];`

Use the `join` method to merge it into the string `'1-2-3-4-5'`.

←→
↑
en ru