Capgemini Interview Question

What is the use of promise function