/react-interview-question

Solution for question asked during interview for React.js role.

Primary LanguageJavaScript

Front-End / React.js - Interview Question

Solution for question asked during interview for React.js role.

Question: Draw/create the following:

  • 3 lights (each with it's own color. Default color is off)

  • 2 buttons (1 for forward, 1 for backward)

    • Buttons should cycle lights through different color combinations. The initial color of all 3 lights is off. If no color combination exists to load on button press, randomly generate a new one and store it, in order, with the previous combinations.