So I ask a user: What is your username with a window.prompt
//public/js/Chat.js
username = window.prompt('What is your username?)
and in my root folder
//app.js
let chatMessage = new Chat({ message: msg, sender: username });
but of course that doesn't work because its not in the same file
So to counter that i tried this:
//public/js/Chat.js
export let username = window.prompt('What is your username?')
//app.js
import { username } from './public/js/Chat.js'
But that doesn't work because it's not a module.