Currently I'm working on the units converter solo project, I wrote the js code which updates the p elements, but it is only updating two of them instead of three. I googled the problem but can't see why it is not working
#innerHTML is not updating the p element in the DOM!
9 messages · Page 1 of 1 (latest)
Hi,
It’s because your IDs don’t match. One is kilo, the other is kilos.
Haha nice catch, I was looking through the code looking for a typo too
Also, could I suggest that you keep consistent names?
len-el, vol-el and mass-el
No worries
Thank you! I used the consistent naming calling it "mass-el" at first, but it didn't work so I started tweaking the names, but now I changed it back and suddenly it worked!😅
Must be the javascriptmas grinch 😁
Hahaha yes!
I also was looking for the typo. Did the kilo and kilos fix it?