Javascript Introduction - Splitting a String

Splitting a string is used by many programmers in manipulating data. This is important for data that needs to be filtered out and that of those being returned by a specific function. In this tutorial, you are going to learn how to split() a string.

The split() method is used to split a string into an array of substrings, and returns them into a new array.

In the last example, we have split the text based on the letter "o". Always remember that the results will be placed into an array and that each split word / letter are store inside a separate array index.

For more tutorials you can check out the courses from Dr. Richard Stibbard.