This is a common problem in real life scenarios, so there’s a lot to learn from this, and my personal opinion is that you should come up with your own implementation for a deeper learning, and then compare ideas after.
While we are primarily here to help people with their Free Code Camp progress, we are open to people on other paths, too. Some of what you are asking is pretty trivial in the Free Code Camp context, so you might find that if you’re not getting the instruction and material you need in your current studies, the FCC curriculum will really help you get started. At a modest guess I’d say investing a 4-5 hours working through the curriculum here will really pay off. You can find the curriculum at https://www.freecodecamp.org/learn.
Specifically, I would suggest you spend some time going over the documentation for these methods:
You can achieve your goal using some of the above. There is no reason to use all of them, but any combination might be helpful. Read the documentation to take full advantage of each method.
Do not fret about struggling with the JavaScript. Even the fCC curriculum is no where near enough, by itself. It provides an excellent pathway through topics, but you will always have to research for yourself.
Keep up with it. It is good that you are trying to solve an idea.