Javascript - swapping 2 objects cyclically
Not what you're looking for?
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)...
I have been trying all kinds of loops but never got it to work.
Purchase this Solution
Solution Summary
This solution helps answer a question involving Javascript.
Solution Preview
Dear student,
Please find the solution attached.
Thanks,
Kavita Narang
(--Please ...
Purchase this Solution
Free BrainMass Quizzes
Java loops
This quiz checks your knowledge of for and while loops in Java. For and while loops are essential building blocks for all Java programs. Having a solid understanding of these constructs is critical for success in programming Java.
Basic Computer Terms
We use many basic terms like bit, pixel in our usual conversations about computers. Are we aware of what these mean? This little quiz is an attempt towards discovering that.
Basic Networking Questions
This quiz consists of some basic networking questions.
C# variables and classes
This quiz contains questions about C# classes and variables.
Excel Introductory Quiz
This quiz tests your knowledge of basics of MS-Excel.