This forum is now read-only. Please use our new forums at

2309 points
Submitted by
Saahil Nawalkha
about 4 years ago

Why do we put numbers in the color variables????

eg- var red = [0, 100, 63];
var orange = [40, 100, 60];
var green = [75, 100, 40];
var blue = [196, 77, 55]

why do we need numbers in array

0 votes


Hi Saahil, those numbers are a way for us to tell JavaScript what colour we would like it to show. There is a more complete explanation of how that works over here.

3698 points
Submitted by
about 4 years ago