I have a data called: cat_pressed
There is also this function that changes the data value:
changeCat(){ this.cat_pressed === 'brauh' }
But whenever I call the function the value doesn't change, I don't know why I've tried everything but nothing works.
It looks like you accidentally used the wrong operator.
Use=== for checking equality - but you want the value to be assigned to
cat_pressed
, so you need =.