Sharing my code for "Test your skills: Math"

here is my code for " Test your skills: Math".

Hi again

Well done!
Here are my comments:

  • Task 1: Your even/odd test is wrong. typeof returns the string “number” which later always fails the test evenOddResult === 0. You need to use the modulo operator (%).
  • Task 2: Correct!
  • Task 3: Correct!

As a general advice:

Always use const where possible, only use let where necessary.

I hope that helps. :slightly_smiling_face:

Cheers,
Michael

2 Likes

just updated my code regarding your comment.
I really do appreciate for your support.

2 Likes

Thanks. I’m glad it’s helpful.

Now the code is correct.

2 Likes