Js Array Reduce Method Javascript Interview