Js Add To Array If Else Javascript Questions Hackerrank Logical Reasoning