Infosys Interview Question

basis JavaScript and string array question