AT&T interview question

Most of the questions were in JavaScript.