Вот так работает
let todositems;
async function f() {
const res = await fetch('https://jsonplaceholder.typicode.com/todos/1');
todositems = await res.json();
}
await f();
console.log(JSON.stringify(todositems));
let todositems;
async function f() {
const res = await fetch('https://jsonplaceholder.typicode.com/todos/1');
todositems = await res.json();
}
await f();
console.log(JSON.stringify(todositems));