Alexa Metrics

Coding Adventure 5: Time for transportation

Master JavaScript

Be familiar with javascript arrays and functions.

JOIN

Description

It is time of cooperation between teammates to start transportation of the valuables. Have fun

Preview Video

Coding Missions

launch time

Now it's transportation time, each lane has a speed. The mine carts lane numbers are shown in the white cells (to the right). Results are shown in the red, yellow, and blue cells. Red cells will contain the first level lane numbers (1st and 2nd ), while yellow cells will contain the second level lane number (3rd and 4th ). Finally, blue cells will contain the lane numbers of the last three positions. It is required to print on screen the colors list in order of lanes like in the shown case:  yellow,red,blue,blue,red,blue,yellow. Hint: Print the list of lane colors that contains the 7 colors ordered by lane number

lanes speed results

Now it is required to print the colors of lanes numbers on screen each lane color in separate line (separate print) like:  yellow red blue blue red blue yellow

Lane speed color and number

Now it is required to print the colors of lanes in numbers on screen each lane color preceded by the lane number like: 

1 yellow

2 red

3 blue

4 blue

5 red

6 blue

7 yellow  

Color lane numbers with their ranking color

Now it is time to color white cells on the right that contain lane numbers. Each lane number should be colored by its results color (1st and 2nd positions in red, 3rd and 4th positions in yellow, rest positions in blue).

Color lanes and print results

Now it is time to do both coloring the lanes and printing results on screen. Color white cells on the right that contain racing lane numbers. Each lane number should be colored by its results color (1st and 2nd positions in red, 3rd and 4th positions in yellow, rest positions in blue). In addition to lane coloring, print the colors of lanes in results on screen each lane color preceded by the lane number like: 

1 yellow

2 red

3 blue

4 blue

5 red

6 blue

7 yellow

Master JavaScript

Be familiar with javascript arrays and functions.

JOIN
Canada Flag Privacy Policy Terms of Use
Got an invite