Upstream interview question

Javascript questions about basic stuff