Newel Technologies Interview Question

Basic JS and react.js question