function splitString(s, delimiter) {
return s.split(delimiter).filter(element => element !== "");
}
function main() {
const s = "C#,Node.js,,C,,,Python,,,,,C++,,";
const arr = splitString(s, ",");
arr.forEach(element => console.log(element));
}
main();
/*
run:
C#
Node.js
C
Python
C++
*/