How to swap two objects


Discussion:

Create a Javascript - swapping 2 objects cyclically

Q: I have two lamps (blue and red). I know how to exchange them (to red and blue etc..)

However I would like to have them both blue and with any button click I'd like them to change repeated cyclically: (blue,red), (red,blue), (red,red), then again (blue,blue)...

 

Solution Preview :

Prepared by a verified Expert
JAVA Programming: How to swap two objects
Reference No:- TGS01938115

Now Priced at $25 (50% Discount)

Recommended (93%)

Rated (4.5/5)