Question: Fix getUserName so that it returns the user's name as LastName, FirstName (without the quotes). Capitalise the first letter of the first and last names

Fix getUserName so that it returns the user's name as "LastName, FirstName" (without the quotes).

Capitalise the first letter of the first and last names

If the lastname is null, just return firstname without a comma

e.g. "John" "Smith" should return "Smith, John"

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

Heres the solution to fix the getUserName function javascript function getUserNamefirstName lastN... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Accounting Questions!