Build a Roman Numeral Converter Project - Beta JavaScript

please read the previous messages in the thread

1 Like

Do you now have a full understanding of why your code was not working?

@bbsmooth 's explanation is perfectly insightful.

2 Likes

Yes, I did. What I’m trying to tell you is that the code you pasted in above has a bug that has nothing to do with vague instructions. As @pkdvalis pointed out, you put the input and button inside of the #output div, and then you overwrite that div by setting innerHTML to the converted Roman numeral string. When you do this you completely wipe away the input and button that was there and thus you can only do one conversion. But the tests are trying to do multiple conversions and so you are failing because it can’t do that. I’m assuming you don’t think this is proper behavior and would consider this a bug with your code :slightly_smiling_face: That’s why I was asking you if you tested your code in FCC, because you should see this behavior right away.

The fact that the instructions don’t tell you specifically not to do this isn’t really a problem with the instructions. You just need to create a proper interface that doesn’t disappear the first time you use it. I think that’s a reasonable expectation even if the instructions don’t specifically state it.

2 Likes

Have you tested my code locally on your machine in a browser via live-server? If so, what were the results? If not, please do so.
There are MANY solutions in tech, not just one. As can be seen in the src img provided. No errors in the console. So please fully explain the ‘bug’ that stops the code from working?
I tested my code on the fCC platform with their test engine, and posted this at the beginning of the thread with accompanying images.
I also coded a reset button to reload the page.
Once again, I did this due to my interpretation of the instructions “user stories” (if random people were asked what their understanding is of this term; I doubt they would say ‘instructions’ " Because in the previous follow along tasks, the fCC platform is VERY particular in the way it tests the code, and what syntax to expect. This MO would then follow-on in the project building exercises? no?
If the instructions had clearly stated: "at least one div with id of output to ONLY hold the converted number; this thread would not have been needed.
Thank you for your explanation.

1 Like

hi @pkdvalis another case of misleading hint with error message.
now completing Number Sorter, and making errors on purpose to see the response.
error hint " You should use document.getElementsByClassName() to get all the elements with the class values-dropdown."
WRONG!
error hint should state: "correctly initiate


the variable with var let const

1 Like

@bbsmooth when you have an opportunity, please read my response.

1 Like

@pkdvalis please explain why the fCC tests, gives the same error with this line of code
const inputValues = document.getElementByClassName("values-dropdown")

1 Like

ElementS, not Element.
I suggest you open a new topic for help with different things, this is dedicated to your roman numeral converter project

1 Like

This has been fully explained more than once. Please let us know if you have any specific questions about it.

1 Like

@bbsmooth how has this been fully explained that there is a ‘bug’ when there is no error in the console?
As you have stated in the thread, the project task is ‘open-ended’
Also, all outputs conform to the requirements of the project task.
I am so not happy with your response.
This doesn’t not make analytical and logical sense.
Unless, you are insinuating the attachment images are wrong!
I am so glad that I have evidence of this full thread.

1 Like

Okay so I might be INCREDIBLY late to the discussion but using .innerText worked for me instead of .innerHTML for the alerts. No clue about the rest though, sorry!

1 Like

@bbsmooth how has this been fully explained that there is a ‘bug’ when there is no error in the console?

A console will just show syntax errors. This wasn’t a syntax error but a functional problem.

As you have stated in the thread, the project task is ‘open-ended’
Also, all outputs conform to the requirements of the project task.

You still need to satisfy the tests. You may have slightly different approach or HTML structure. You were very close to completing, just that one HTML structure issue was breaking your functionality.

I am so not happy with your response.
This doesn’t not make analytical and logical sense.

In what way? The error was found and clearly explained. It sounds like you completed your project and moved on to the next?

If you need help with any other projects or have questions about something else please start a new thread.

1 Like