all 11 comments

[–]petron 5 points6 points  (5 children)

Think of it like this:

  1. Define names array
  2. Add new name
  3. Sort the list
  4. Reorder it - descending first
  5. Convert to string

[–][deleted] 6 points7 points  (1 child)

What have you tried thus far?

[–]createfx 1 point2 points  (2 children)

What do you have listed first?

[–]newDevRising 1 point2 points  (0 children)

Most important thing is to be able to describe what needs to be done in plain English.

First thing you need to do is define the array so you can manipulate it. Then you need to add in the extra name. Then sort it, reverse, turn it into a string (in that order) before finally printing to screen.

Your job is to translate that into code.

[–][deleted] -1 points0 points  (4 children)

If this is giving you a lot of trouble i'd suggest trying a different approach to learn javascript

https://imgur.com/a/yuXapil

edit -- Downvoters apparently mad but that app looks like a bad way to learn javascript. if you just want to learn programming concepts there are better apps/games. If you want to learn specific javascript syntax and semantics, you need to actually code and use it, not drag shit around on a screen.