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

202
Views
How to Convert Single quoted elements of Array into just comma separated string

I have a array like

let array = ["MR','JR','IR','MY"]

I want to convert it into a comma separated String like

string = MR,JR,IR,MY

Any help is appreciated and Thanks in advance

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

You need to use the join method with comma as a separator

let string = array.join(',')

EDIT: Actually your array have only one position, so you are not joining anything. You only need to replace the character ' and you are done.

let string = array[0].replace(new RegExp("'", "g"),"")
about 4 years ago · Juan Pablo Isaza Report
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!