DigiValet interview question

How would you select an element on a website using JavaScript?