How to show code output in text?

Ok… Thanks… but can you explain why i’m getting error in this code

export async function getData() {
 
 const apiKey = "xxxxxxxxxx";
 //const id = "xxxxxxxxxxxxxxx";
// here i want to take field item from database & insert in the "id" so repeater shows every item
 let id = $w("#title").id; // "myElement"

 
let response = await fetch("xxxxxxxxxxxxxxxx, {
        method: 'get'
    });