how to convert string to int a array in javascript
var a = "1,2,3,4";
var b = a.split(',').map(function(item) {
return parseInt(item, 10);
});
how to convert string to int a array in javascript
var a = "1,2,3,4";
var b = a.split(',').map(function(item) {
return parseInt(item, 10);
});
javascript Convert an array of strings to numbers
const toNumbers = arr => arr.map(Number);
toNumbers(['1', '2', '3','4']); // [1, 2, 3, 4]
convert array to number
let x = [1,2,3,4,5]
let num = +x.join("")
number to number array
public int[] IntegerArrayNum(int num)
{
var ls = new List<int>();
foreach ( var i in num.ToString().ToCharArray())
ls.Add(Convert.ToInt32(i.ToString()));
return ls.ToArray();
}
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us