So I had a lot of fun doing the JavaScript projects, but really didn’t understand how JavaScript could be used in an actual web page. Then I started the front-end libraries challenges hoping that it would become clear, but now I feel like I’m learning so much new framework stuff without having the foundation of using pure JavaScript in an app. So I decided to take a quick detour to make a super simple UI for the palindrome checker project using just JavaScript.
Can you take a look at it and check if I’m doing everything correctly? Here’s some questions I have:
- It seems like I write
document.getElementById()
many times. Is this the best way to do this? - To display the results I use a single
<p>
element and change the inner text and the color style property. Is this good? Should I have separate<p>
elements instead and change their visibility instead?
Thanks so much for any feedback you can give! I know this is just a super simple project, but I want to know I’m doing this correctly before things get more complicated.