Build a Roman Numeral Converter Project

Until number.value 16, it was working even repeat same “else if” code that works same stiuation, it doesnt work anymore

The reason is that in your conditions you are using assignment operator = instead of equality operator ==

If you use = in your condition, it will assign that value instead of checking, which will always evaluate to true.

In your case, the condition which assign 9 will always be executed if the previous conditions failed. That’s why the conditions after the number 9 will not be checked at all.

If you completed the course and earned your certificate, your projects can be accessible to see by others if you have the proper settings. That’s why you should create a full-working project for any user input instead of checking for the tests values to pass.

You can understand how to convert a number into Roman numerals
then you can think of a way to achieve that using your skills in JavaScript.

1 Like