Answers for "split in string with letters and numbers javascript"

5

split the numbers js

var num = 123456;
var digits = num.toString().split('').map(iNum => parseInt(iNum, 10));
console.log(digits);
Posted by: Guest on February-29-2020
3

split a string every n characters javascript

console.log("abcd".match(/.{1,2}/g)); // ["ab", "cd"]
Posted by: Guest on January-05-2021

Code answers related to "split in string with letters and numbers javascript"

Code answers related to "Javascript"

Browse Popular Code Answers by Language