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

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:

Help please

Profile icon
  1. onclicick?
  2. when using void to execute javascript, use an self-executing anonomous function like href="void((() => {/*code here*/})())"
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