2017-05-28 00:38:50 +02:00
|
|
|
'use strict';
|
|
|
|
// 22.1.3.13 Array.prototype.join(separator)
|
2017-08-14 05:01:11 +02:00
|
|
|
var $export = require('./_export');
|
|
|
|
var toIObject = require('./_to-iobject');
|
|
|
|
var arrayJoin = [].join;
|
2017-05-28 00:38:50 +02:00
|
|
|
|
|
|
|
// fallback for not array-like strings
|
|
|
|
$export($export.P + $export.F * (require('./_iobject') != Object || !require('./_strict-method')(arrayJoin)), 'Array', {
|
2017-08-14 05:01:11 +02:00
|
|
|
join: function join(separator) {
|
2017-05-28 00:38:50 +02:00
|
|
|
return arrayJoin.call(toIObject(this), separator === undefined ? ',' : separator);
|
|
|
|
}
|
2017-08-14 05:01:11 +02:00
|
|
|
});
|