且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何将数字数组连接到1个串联的数字中?

更新时间:2023-02-09 21:24:28

使用数组join方法.Join将数组的元素连接成字符串,然后返回该字符串.默认的分隔符是逗号(,).这里的分隔符应该是一个空字符串.

Use array join method.Join joins the elements of an array into a string, and returns the string. The default separator is comma (,). Here the separator should be an empty string.

var  x = [31,31,3,1].join("");