jquery explode string – How to Explode or Split a String in JavaScript?

jquery explode string : javascript explode split into array of strings. or split() javascript Example – Simple jQuery code snippet to create an array from a string using jQuery split() command which is like the PHP explode() method.

jquery explode string – How to split string to array by comma using jquery?

If you want to explode or split a string from a certain character or separator you can use the JavaScript split() method.

Read Also:  bootstrap 4 multiple image slider with thumbnail navigation

javascript explode

split into array of strings.

var user_str = "pakainfo, w3diy, infinityknow , love , you, jdk";
var res = user_str.split(",");

Don’t Miss : jquery split string to array

Example: JavaScript String split() Method

index.html

<!DOCTYPE html>
<html>
<head>
    <title>How to split string to array by comma using jquery? - www.pakainfo.com</title>
</head>
<body>
  
<script type="text/javascript">
   
    var loveStr = "J,K,A,D,C,S,A,V,A,N,L,O";
   
    console.log(loveStr.split(','));    
   
</script>
</body>
</html>

I hope you get an idea about jquery explode string.
I would like to have feedback on my infinityknow.com blog.
Your valuable feedback, question, or comments about this article are always welcome.
If you enjoyed and liked this post, don’t forget to share.