Making API calls

How do i use the in-built browser “fetch” function to make an API call to the URL declared as the api variable? I’m a Newbie…