Okta interview question

Implement a function in JS to fetch data from a URL and render it on UI.