Yes, as long as the array elements don't contain your separator character (in this case, a comma), you'll get the same array. Since you're trying to retrieve an array of window IDs, you won't have any trouble with possibly having a comma in an element's value.
Just one note, it should say:
js code:
Msg.split(","); //note the quotes around the comma, you're passing a regular string as first parameter here for String.split()