How to split a string in JavaScript ?

In JavaScript , the web developers can use the string.split() method to split a string into an array of sub strings.

How to split a string in JavaScript ?

Below is a sample code snippet demonstrating how to split a string in Javascript.

  var input = " is a technology Blog";
  var output = input.split(" ");

If you enjoyed this post, please consider leaving a comment or subscribing to the RSS feed to have future articles delivered to your feed reader.

Leave a Reply


Interesting BlogPosts to read

How to Flatten a 2-D array in JavaScript ?
You can flatten a 2-D array in JavaScript using the concat and apply method as shown in the below co...
How to convert from Degree to Radian in JavaScript ?
Assume that you have an angle in degree and you wish to convert it to radians in JavaScript so that ...
JavaScript Tutorial #8 - Operators in JavaScript
JavaScript supports different types of operators that includes Assignment Operator JavaScript supp...