check comma in string javascript

Solutions on MaxInterview for check comma in string javascript by the best coders in the world

showing results for - "check comma in string javascript"
Lucia
03 Jun 2020
1var strs;
2if( str.indexOf(',') != -1 ){
3    strs = str.split(',');
4}
5