Everything works, but how do I bring the variable "data" out of the .then() method so that I can call it later in the program?
fetch("http://localhost:8088/get/value")
.then(response => response.json())
.then(data => console.log(data));
Everything works, but how do I bring the variable "data" out of the .then() method so that I can call it later in the program?
fetch("http://localhost:8088/get/value")
.then(response => response.json())
.then(data => console.log(data));