Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save djD-REK/7f6f619448b0c33becbbb65293e69cdf to your computer and use it in GitHub Desktop.
Save djD-REK/7f6f619448b0c33becbbb65293e69cdf to your computer and use it in GitHub Desktop.
const loadScript = async (url) => {
const response = await fetch(url)
const script = await response.text()
eval(script)
}
const scriptUrl = "script.js"
loadScript(scriptUrl)
@mtoma-ripple
Copy link

Hi,

I'm getting an error at line
const loadScript = async (url) {
it says I have to change it to
const loadScript = async (url) => {

@djD-REK
Copy link
Author

djD-REK commented Apr 12, 2021 via email

@djD-REK
Copy link
Author

djD-REK commented Apr 14, 2021

Thanks again @mtoma-ripple !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment