How to split comma separated string using JavaScript? [duplicate] October 7, 2022 by Tarik var partsOfStr = str.split(','); split()