Replace flattern() to Array.prototype.join

flattern() is not necessary as Array.prototype.join has already implemented.