Answers for "string number to array"

17

kill all server 5000 mac

#First run this, to get port information (with the port you want to kill)
sudo lsof -i :3000 

#Then run this, with <PID> replaced by the value in the column returned by previous command.
kill -9 <PID>
Posted by: Guest on July-14-2020
1

convert array string to number

// CONVERT ARRAY STRING TO ARRAY NUMBER
const arrStr = ["1", "3", "5", "9"];
const nuevo = arrStr.map((i) => Number(i));
console.log(nuevo);
// [1,3,5,9];
Posted by: Guest on June-09-2020
0

string number to array

b="1,2,3,4".split(',').map(x=>+x)
// [1,2,3,4]
Posted by: Guest on October-23-2021

Code answers related to "string number to array"

Code answers related to "Javascript"

Browse Popular Code Answers by Language