Split javascript string

In this article, we will discuss how to split a JavaScript string. Also, you can check my previous posts on:
Here is the string:
var strMainString = new String();
strMainString = “AspDotNetHelp.com|SharePointDotNet.com|EnjoySharePoint.com|Fewlines4Biju.com”;
Now we can split the string with separator “|” and we will store in an array.
var arr = new Array();
arr = myString.split(“|”);
Now we can retrieve the items from the array by using a for loop statement like below:
for(var i=0; i < arr.length; i++)
alert ( arr[i] );
Check out Best Alternative to InfoPath -> Try Now

You May Also like the Following SharePoint Online Tutorials:

About Bijay Kumar

I am Bijay from Odisha, India. Currently working in my own venture TSInfo Technologies in Bangalore, India. I am Microsoft Office Servers and Services (SharePoint) MVP (5 times). I works in SharePoint 2016/2013/2010, SharePoint Online Office 365 etc. Check out My MVP Profile.. I also run popular SharePoint web site SharePointSky.com

View all posts by Bijay Kumar →