javascript - parse string and store it in differents variables : my problem is the next one :

I have a string with a special character that 'separates' the string in different parts.

    var str = "this could be part 1 -- this is part 2 -- here is part3";

Here i chose '--' as special group of characters to delimit the parts.
And i would like from this string to be able to be able to separate these parts and put one of each in an array and get this result :

    this could be part 1 , this is part 2 , here is part3

What is the better way to do this ?

Thank you in advance for your answer

