ServiceNow interview question

phone screen: javascript onsite: algorithms and coding