Assessment wanted for Math 1 skill test. (Tasks 1-3)

Assessment wanted for Math 1 skill test. (Tasks 1-3)

Link to task: https://developer.mozilla.org/en-US/docs/Learn/JavaScript/First_steps/Test_your_skills:_Math

Links to my code:
Task-1: https://jsfiddle.net/EiNzp/gj3dLwxv/1/
Task-2: https://jsfiddle.net/EiNzp/hne36oxf/1/
Task-3: https://jsfiddle.net/EiNzp/bLxze9mw/1/

Thanks :wink:

Hi @EiN

Everything is correct.

In task 2 you could shorten result = result * result2; to result *= result2;.
I recommend using const instead of let wherever possible. It helps avoiding errors where you accidentally reassign variables.

Happy coding,
Michael

1 Like