pointLabel from multiple sources

I am practicing with the intro lesson posted by Desmos.
There is an activity at the end which asks me to get a nametag in the Graph window to display information based on the contents of two cells in a table.

I have been able to get one or the other cell to correctly apply to the label at A with the following code:

pointLabel(“A”):table3.cellContent(1,1)

I cannot figure out how to pull from two different cells in the table and have them display side by side with the pointLabel command. I could not find the topic that discusses this question so any help would be greatly appreciated. (either answers here or directions to the proper thread.)

When you want multiple variables in a string, use quotes and to call each variable within the quotes you have to use ${ }:

pointLabel(`A`): "(${table3.cellContent(1,1)},${table3.cellContent"})"

Notice it also allows you to type whatever text around those variables as well. Many people use this type of thing for feedback in a note, or displaying randomly generated equations, etc.

1 Like

That worked perfectly, thank you. :slight_smile: