I seen this code
a=a.join("").split("");
What does this code do? I think a was a string array, but is it still a string array? does this filter out values? what does it do?
I seen this code
a=a.join("").split("");
What does this code do? I think a was a string array, but is it still a string array? does this filter out values? what does it do?
it creates a copy of the array, dunno why it is assigned to the same variable
a is still a string array, but is an array of characters.
a == ["foo", "", "", "bar", "baz"]
a.join("") == "foobarbaz"
a.join("").split("") == ["f", "o", "o", "b", "a", "r", "b", "a", "z"]
I don't know the purpose of this code.