how to get fetch return into outside global value in Vanilla Javascript [duplicate]

I’m trying to load a json file into a varibale in vanilla javascript.
The below script I’m trying to work out.

let darth;
fetch('data/us-states-poly.json')
    .then(response => response.json())
    .then(darthVaderObj => {
      darth = darthVaderObj;
      console.log(darth);  <!--this one works-->
    })
console.log(darth);  <!--this one does not-->

my question is simple, if the first console.log() function works, and the second doesn’t, that tells me that it’s a scope problem. My concern is that I already instantiated darth outside the fetch.

So why does the second one not work? and how do I get the data outside the fetch?

there was a recommendation that this solution would help: Why is my variable unaltered after I modify it inside of a function? – Asynchronous code reference

While the solution does eloquently discuss the scoping theories and why it doesn’t come out, it does not provide adequete answers on HOW to get the data back out.

Thanks