Skip to content
← Back to Community
Something's wrong with my function.
Profile icon
cuber1515

Error with a function

So I'm making a small website for practicing JavaScript, it's just a bunch of window history stuff.

The problem is that whenever I add that last variable (it's in the script.js file) the repl just gives up even trying to run.
svg files cannot be displayed: https://replanalytics.repl.co/track/8a2d1159-a332-4163-a092-44f9a5385b9a/empty.svg

Help please

Comments
hotnewtop
Profile icon
AzureDev
  1. onclicick?
  2. when using void to execute javascript, use an self-executing anonomous function like href="void((() => {/*code here*/})())"
    breakdown:
void( // start void ( // start parens () => { // start arrow function // function body } // end arrow function )() // execute whatever is in the parens, which is a func ) // end void