var a = "foo";
var c = Array.prototype.join.call( a, "-" ); // 'f-o-o'
How does the second line of code work? I don't see any conversion of the string to an array and then converting back again, is this happening in the background? I've encountered this kind of code and it's very weird, an array method accepting a string.