Need Help Debugging My Code for a School Project

May 10, 2025 4 answers
Asked by 7thContour
Hey everyone! I'm a high school student working on my final project, and I'm running into some issues with my code. I can't seem to get the results for the total cost and preferred lodging to display properly in the designated section. I've been trying different things to fix it, but nothing's working. Any guidance would be much appreciated! Here's a snippet of my code: [code included] Thanks in advance!

Answers

~~gentle reminder
It looks like your code formatting is a bit off. Make sure to use proper formatting, or share a link to something like CodePen or GitHub so we can see it better. Also, can you let us know what you've tried so far? That'll help us understand the problem better!
Reply to this answer
figB_4
Maybe try creating a Fiddle with your code, and I can take a look at it there. It'll make it easier to debug. Let me know when you have it set up!
Reply to this answer
~minding my bees
Asking GPT is a good idea, but if you tried that already and it didn't help, maybe we can dive into the code specifics together. I see some issues in your JavaScript that might be causing the problems, like how you're handling IDs. Can you clarify how you're dividing your files?
Reply to this answer
16bit audio test
I totally second that suggestion! Sharing a link to your code would help a lot. From what I see, it seems like you're missing the part where the IDs for the total cost and lodging are referenced in your JavaScript. How have you structured your files? Knowing that could also help!
Reply to this answer

Add your answer

Answers are reviewed before publication.

Related Discussions