lib/hacker_news/article.rb
def kids_by_id(id)
        comments = [ ]
        parent = all.select {|e| e.id.to_s == id}
        comments << parent&.first&.kids
        comments << parent&.first&.descendants
        comments
      end
#returns kid id's by parent id on invalid return nil
returns kid id's by parent id on invalid return nil
returns kid id ' s by parent id on invalid return nil
def kids_by_id(id)
        comments = [ ]
        parent = all.select {|e| e.id.to_s == id}
        comments << parent&.first&.kids
        comments << parent&.first&.descendants
        comments
      end
def kids_by_id ( id ) comments = [ ] parent = all . select { | e | e . id . to_s == id } comments << parent &. first &. kids comments << parent &. first &. descendants comments end
returns kid id's by parent id on invalid return nil
returns kid id ' s by parent id on invalid return nil
id