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

215
Views
Split Full Name to First Name and Last Name in Javascript

I have this var fullName = 'Muhammad Ali', what I want to do is split the First Name and Last name from it.

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

0

For simple cases, use .split(). Usually a simple google search can help you.

let fullName = 'Muhammad Ali'
let formattedName = fullName.split(" ")
console.log(formattedName)

about 4 years ago · Juan Pablo Isaza Report

0

You can use the .split() method to split the string to an array based on spaces in the string. I would use caution with this as names can differ in length and have more than one space.

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!