I build a desmos to assess the students with graphing skills. So depending on what they graph they get a grade. (It’s pretty cool). On the first page I am storing grades but for an unknown reason Desmos is not working right. Where it should appear 0 it appears NaN. So it looks like storing variables on the graph will not work until you actually go to the slide containing the graph. So from slide 1 I can’t retrieve a value stored in the sketch1 object in slide 2. (It’s like the object is not created). Something as
sketch1.number(“G_f”) from slide 1 will not retrieve any value even if it’s defined in the most easy way.
I do not like this behavior, but I had similar problem. I found 2 solutions.
number(`G_f`):when isUndefined(this.sketch.strokeCount) 0 otherwise this.number(`G`)
or
number(`G_f`):when this.sketch.strokeCount > 0 this.number(`G`) otherwise 0
For some reason CL is confused with =, because when starting is appears to be undefined.
I was wrong, it works when you get to a screen and then go back.
Edit:
If you put screen 1 as the last one it works.