Hey man !
Have a look on your GitHub, I opened a new pull request ! This time, I mainly focused on fixing your algorithmic problems, to train myself in JavaScript.
Well, you managed to deal with the .json
, congratulations for that ! Also, you seems pretty comfortable with fetch()
methods and stuffs. I just tried to reoganize it, to avoid repetition in your code. But that wasn't bad at all !
The main thing which has bothered me was about coloring the selected text. Usually, we use to manipulate the DOM, and add/remove active
classes. By this way, you don't just change the color, but you add a class on the DOM element, so your able to do many things with that, and you can interact with the page itself : make some elements transparents, like a navbar if scroll is on-top
, move elements, or other really interesting things about front-end possibilities.
Beside that, I liked the fact that you tried to generate your page with your JSON object on loading ! It's not the way that I did that when I resolved that exercice months ago, but I found it clever ! The trick that I used to do that here is maybe not the most efficient, but at least, it works...
Just one last thing : be attentive to HTML errors that FEM calculate for you... It's very important to get a right structure first, before to focus on other langages. Bad HTML semantic has a pretty big impact in SEO, try to get a look to issues, next time !
Tell me if you learned some stuffs, have a nice day !
Marked as helpful