LinkedIn interview question

Write "getElementsByClassName" function.