The first 3 lines behave like I expected–left’s color was changed to red, right’s text was changed from a “B” to an “A”, and right’s color was changed to green. I thought the 4th line would change right’s color to red (the color of left), following the syntax of line 2.
Ah, OK that makes sense that left.String() can’t represent two different things. I don’t know Javascript but your example looks fairly straightforward so I’ll give that a try. Thanks!
Thanks for this example, it’s very helpful. I was able to use this idea to use an array of colors that I could match up the values with the object variables.