EY Interview Question

basic JS, and angular