Splunk interview question

Few questions on JavaScript basics and 1 JavaScript UI coding question