join an array of numbers into 1 number in javascript? -


how join array give me expected output in few steps possible?

var x = [31,31,3,1] //expected output: x = 313131; 

use array join method.join joins elements of array string, , returns string. default separator comma (,). here separator should empty string.

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

Comments

Popular posts from this blog

apache - PHP Soap issue while content length is larger -

asynchronous - Python asyncio task got bad yield -

javascript - Complete OpenIDConnect auth when requesting via Ajax -