ちなみに今a.jsonは{"a":1}で
var a;
let url = './a.json';
fetch(url)
.then(response => response.json())
.then(data => {
a=data;
});
これでaがundefibedになります