OneTrust Interview Question

Basic js hacker rank question