Math problem 2 assesment neded https://developer.mozilla.org/en-US/docs/Learn/JavaScript/First_steps/Test_your_skills:_Math

it works out ok, because I get 10.42. but is it the right way to get it?

Hi @batoru1 and welcome to the community :wave:

Nice work. This is mostly correct.
To fix the wrong result you should use parentheses instead of setting the result directly:

let result = (7 + 13) / (9 + 7);
let result2 = 100 / (2 * 6);

This also gives the result of “10.42”.

You could also merge the last two lines together:

let finalNumber = Number(finalResult);

Have a nice day,
Michael

1 Like

Thank you Michael! Very clear explanation :slight_smile:

1 Like