In the case that you do updates to videos, this component has an usused variable + query part. I removed that here.
And while I was here, I just wanted to throw in a different approach for countPizzasInToppings. I like to pause the video and try to solve stuff before I get the answer, and this was what I came up with. It's not necessarily better, its just different, throwing it in for fun.
If you want the query update without the function update let me know and I can revert those lines.
In the case that you do updates to videos, this component has an usused variable + query part. I removed that here.
And while I was here, I just wanted to throw in a different approach for
countPizzasInToppings
. I like to pause the video and try to solve stuff before I get the answer, and this was what I came up with. It's not necessarily better, its just different, throwing it in for fun.If you want the query update without the function update let me know and I can revert those lines.