Am finding it difficult to complete a solution

Question:
“JavaScript” Can anyone assist me in solving a problem in function???

Repl link:

code snippet

Hi there @AyoolaShey! Is this a school assignment? If so, I cannot help you due to restrictions.

No but am actually doing self learning, however I can show you my solution probably you can correct me

We can help, just not Provide answers.

2 Likes

Sure we can help! But as said before, we will not give you the answer, just guide you through the problem!

  1. The first question is simple as that, create the array!
  2. Here, we need a function that does two things: first, it should reverse the array; second, it should translate numbers to words.
    So… think about how to reverse an array in JavaScript. (There’s a built-in method for this!)
    And, for translating numbers to words, you could use a mapping or a switch-case structure.
  3. and 4. Is the same principle as question 2.

The loop you made is in the right direction! You just need to adjust some syntax errors and don’t forget to define the output array.

3 Likes