I'm trying to make a fetch function that not returns the data.
var url = "https://www.google.com/";
var testData = fetch(url, {
method:'GET'
})
.then(function(resp){
return resp.json();
})
.then(function(data){
return data;
});
console.log(testData); // here i want to print data