2

I am trying to execute a function when I change a variable, such as:

x = "Hello, World"
//console.log("Your value changed to: ", val)

I am looking at the prototypes of variables and setter functions. Is there a way to use both of these to attach a setter function to when the actual variable is changed?

Jack Berendt
  • 21
  • 1
  • 4

0 Answers0