Search snippets
Browse Code Answers
FAQ
Usage docs
Log In
Sign Up
Home
Javascript
how to convert string to int a array in javascript
Joshua Englehart
Programming language:
Javascript
2021-06-05 23:28:53
0
Q:
how to convert string to int a array in javascript
ineztia
Code:
Javascript
2021-05-22 01:26:59
var a = "1,2,3,4"; var b = a.split(',').map(function(item) { return parseInt(item, 10); });
4
Tags
string
array
java
javascript
int
con
how
Related
how to change string to array in javascript
js string to array
how to convert array converted to string back to array javasccript
javascript string to array
javascript Convert an array of strings to numbers
how to convert string to int js
string to array javascript
how to turn a string to a number js
javascript string to integer
javascript turn string into array
javascript cast bool to int
turn number into array javascript
convert string to array javascript
integer to array javascript
javascript convert string to number or integer
convert string to array js
Javascript string to int
New to Communities?
Join the community