Alert When Correct Placement

Not new to Desmos, but learning CL. I am working on this quadratic application:

and I want to alert the user when they have correctly snapped the draggable point to the correct spot. How can I do that?

Again, trying to learn, so I’d rather if someone gave me a quick tutorial instead of just writing the code for me.


You have variables a and b in your graph representing the x and y coordinates of the green point.

Wherever you plan on using it, make the conditions for a correct answer be that number(“a”) and number(“b”) both equal to their respective answer key values.

If you intend on using it in more than one place it might be a good idea to create a correct variable in the graph component like correct = this.number("a") = ___ and this.number("b") = ____ then use the .script function to call on it elsewhere.

Elsewhere you can then just say that when graph.script.correct (the correct thing) otherwise (the not yet correct thing).