/arrays-3

Primary LanguageHTML

Arrays 3

For this final array task, we provide you with a starting array, and you will work in somewhat the opposite direction. You need to:

  1. Remove the last item in the array.
  2. Add two new names to the end of the array.
  3. Go over each item in the array and add its index number after the name inside parentheses, for example Ryu (0). Note that we don't teach how to do this in the Arrays article, so you'll have to do some research.
  4. Finally, join the array items together in a single string called myString, with a separator of " - ".

Ref: https://developer.mozilla.org/en-US/docs/Learn/JavaScript/First_steps/Test_your_skills:_Arrays

Live web: https://gitthuma.github.io/arrays-3/