ServiceNow Interview Question

Javascript coding question to design a simple UI