TypedArray.prototype.join()
TypedArray
实例的 join()
方法通过连接此类型化数组中的所有元素(用逗号或指定的分隔符字符串分隔)来创建并返回一个新字符串。如果类型化数组只有一项,则将返回该项而不使用分隔符。该方法与 Array.prototype.join()
的算法相同。
¥The join()
method of TypedArray
instances creates and returns a new string by concatenating all of the elements in this typed array, separated by commas or a specified separator string. If the typed array has only one item, then that item will be returned without using the separator. This method has the same algorithm as Array.prototype.join()
.
Try it
语法
参数
返回值
描述
¥Description
详细信息请参见 Array.prototype.join()
。此方法不是通用的,只能在类型化数组实例上调用。
¥See Array.prototype.join()
for more details. This method is not generic and can only be called on typed array instances.
示例
使用 join()
规范
Specification |
---|
ECMAScript Language Specification # sec-%typedarray%.prototype.join |
浏览器兼容性
BCD tables only load in the browser