RJ Softwares Interview Question

Gave a code to do using props