How to make text bigger with Js via onclick?

You would then pass changeSize as the click event callback function while binding this amount (a postive or negative value) to it as an argument. Inside changeSize, you would add this amount to currTextSize and then call your existing adjustText function.

Can you show me how to bind it? I take it this isn’t right since you want me to add this amount in the currTextSize function.

bigger.addEventListener ("click", changeSize.bind (currTextSize+=10));
smaller.addEventListener ("click", changeSize.bind (currTextSize-=10));

Like this?

bigger.addEventListener("click", changeSize.bind(currTextSize, 10));
smaller.addEventListener("click", changeSize.bind(currTextSize, -10));

As a side note, what would you do if it was not a global variable?

Oops like this I mean?

bigger.addEventListener("click", changeSize.bind(10));
smaller.addEventListener("click",changeSize.bind(-10));

So I need to get rid of the addEventListeners I now have all together and use a variable instead? Like this, as described in documentation.

var leadingThirtysevenList = list.bind(null, 37);

But then what will I use as a variable in this instance? And how will that link to my bigger and smaller elements… I’m stumped

@Sam_Warre26 , just curious but were you able to implement @camperextraordinaire other suggestion to accomplish your project?