Michael Humenick1,138 Points
I do not understand arrays at all
Thanks in advance!
MFrank Johnson4,961 Points
// START CONSOLE
// Create an array named 'arrayColor' which contains colors!
let arrayColor = ['blue', 'green', 'yellow'];
// Make the console show the array and its contents.
// The above command will show the following output indicating an array with 3 elements.
// > (3) ["blue", "green", "yellow"]
// If you click on the little arrow in front of the #3, you should see something similar to the following.
// (3) ["blue", "green", "yellow"]
// 0: "blue"
// 1: "green"
// 2: "yellow"
// length: 3
// proto: Array(0)
// Show the color of the sky in the console.
console.log('The sky is ' + arrayColor);
// The above command prints 'The sky is blue' to the console.
// Show the color of grass in the console.
console.log('Grass is ' + arrayColor);
// The above command prints 'Grass is green' to the console.
//Show the color of the sun in the console.
console.log('The sun is ' + arrayColor);
// The above command prints 'The sun is yellow' to the console.
// END CONSOLE
Hope that helps.
Want to test your understanding? Write a command to the console using your new array that says 'blue and yellow make green'. Add your answer here and we'll see if you got it.