Pergunta de entrevista da empresa Apple

Write a program to go through a DOM tree