Amazon interview question

Write the querySelectorAll method in JS