$(document).ready(()=> {
    window.chat = Chat();
});
Chat = async function() {
    this.hello = "world";
    // more code
}
when I type in chat in the console, I got
Promise {<fulfilled>: undefined}
When I type chat.hello, I got undefined error
How can I get or access chat.hello from the debug console ?
I also tried
$(document).ready(async ()=> {
    window.chat = await Chat(); // this is NEVER called 
});
 
    