Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

99
Views
How do I turn a string into an array?

I'm making a Pearson's coefficient calculator so I need to get a data from input in format divided by commas "1,2,3,4,5" or by spaces "1 2 3 4 5" and anyways this is going to be a string and I need to turn it into array such as [1, 2, 3, 4, 5] so i can perform all the Math.

And this is where I struggle, I tried using for loops and slice() and parseInt() methods but it's so clunky and didn't work out anyways.

Thank you in advance

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!