Deloitte Interview Question

Angular JS code