We're a place where coders share, stay up-to-date and grow their careers.
I presume you could do something like this?
const moduleImport = async (loc, callback) => { const module = await import(loc); callback(module); } moduleImport("./dog", ({ bark }) => { bark("Hello World") });
How is this better than just using a promise, as shown in the post?
I presume you could do something like this?
How is this better than just using a promise, as shown in the post?