How to store fetch response in javascript variable - Stack Overflow

PHOTO EMBED

Sun Oct 22 2023 15:02:12 GMT+0000 (Coordinated Universal Time)

Saved by @ADistractedDev #javascript #reac #jest

async function fun() {  return fetch('https://jsonplaceholder.typicode.com/todos/1').then(res => res.json());} const data  = await fun();
content_copyCOPY