This will not do what you think it does. First, hasOwnProperty must have an argument. Second, hasOwnProperty returns a boolean, not a string name. Third, multiple comparisons don’t quite work like that.
You will need four distinct conditional expressions for this challenge. You can put in all on one line if you like, but you will need a way to express the four separate conditional expressions no matter what. (They are very similar, so there is a way to use high order functions here to reduce duplicate code)
Can you recommend a book or other resources that will allow me to practice more.
I have done most of codecademy as well. I am not doing so well with the algorithms.
Any thoughts on Javascript 30?
My goal is to code an app (in JavaScript so that I can convert it to both android and Ios).