Xoriant Interview Question

React Routing Javascript problem scenario