Capgemini interview question

They are giving two practical one is promise example and second one is array based.