In this tutorial im going to use split () function used to split a string into array of substrings and return in to a new array. Below i have to used split function to create an array using split function in jquery.
Example :-
<!DOCTYPE html>
<html>
<head>
<title>Remove comma using split function using jQuery</title>
</head>
<body>
<script type="text/javascript">
var myString = "Bokaro,Delhi,Patna,'Kolkata,'Pune'";
console.log(myString.split(','));
</script>
</body>
</html>
Output :-
![](https://www.devopsfreelancer.com/blog/wp-content/uploads/2023/06/image-38-1024x397.png)