Ampre’s code has a bug in handling Array of strings (refer to my previous post). Since he is just enclosing the result of original Array.toString() with square backets it returns [a,b,10] when it is supposed to return [‘a’, ‘b’ ,10]. Just replacing his version of Array.prototype.toString with the following code fixes it.

[UPDATE] included the ActionScript 3 version as well 🙂 It became lot more simpler with the regular expressions

/*
 ************************************************************
   Developed by R.Arul Kumaran [[email protected]]
   for more code keep visiting [www.luracast.com/all/blog]
 ************************************************************
 */
 /*
Coming Soon....
*/


 */
/*
/*
 ************************************************************
   Developed by R.Arul Kumaran [[email protected]]
   for more code keep visiting [www.luracast.com/all/blog]
 ************************************************************
 */
Array.prototype.toString = function() {
        var s;
        for (var i = 0; i