Write a function named fetchBranchNames that receives 2 parameters:
username of a GitHub userrepoThe function should return a Promise that resolves to an Array with the names of all branches in that repository.
If the username or repo does not exist, the returned Promise should resolve to an empty Array.
PS: here's the link to the GitHub API: https://docs.github.com/en/rest. It's your job to find the correct endpoint to call.
username
=repo
=