So i assume this is the correct place for this but im not sure. I have been working on the intermediate Algorithm challenges and I am able to solve them after due time and sometimes research to see how others approached it. But one challenge in particular sparked this question. I geuss im not looking for an answer but more of insight. the challenge “Everything Be True”. I was able to complete this challenge pretty easily after learning how to deal with the NaN argument of one of the test. After finding a work around I took a look at this page.
And I saw how simply it was solved, and that I had basically hard coded a switch statement to do what the simple
Boolean(collection[c][pre]) call did in this example. I am actively learning and trying to understand completely each challenge and I believe it is just lack of knowledge sometimes like in this example not knowing about this Boolean call. I guess what I am asking is as I continue to learn JS I assume I will get more in tune with these methods. Anyways like I stated before not looking for a direct answer but any thoughts are welcome.
I’ll link a code pen with my solution on it. If anyone wants to take a look.