/*
    Here is an example of a conditional inJavaScript
*/
var numberOfParticipants = 5;
var maxNumberOfParticipants = 10;
if (numberOfParticipants < maxNumberOfParticipants)
{
    console.log(\"You can add anotherparticipant now\");
}
else
{
    console.log(\"Sorry, you have reached themax number of participants and cannot add another\");
}
/*
    Now it's your turn - create a simpleconditional like my example. You can setup variables like I did orjust use
    hard-coded numbers
*/
/*
    Here is an example of creating a list inJavaScript it is called an array. Here I am creating a list of myfavorite songs:
*/
var myFavoriteSongs = [\"Shake It Off by Taylor Swift\", \"12 Shotsby Vic Mensa\", \"LSD by A$AP Rocky\"];
/*
    Now it's your turn. Create an array ofthe colors in a rainbow (ROYGBIV)
*/
/*
    Here is an example of creating a forloop in JavaScript. There is no foreach in JavaScript so we have todo it slightly differently than
    in App Inventor. Notice how it countsfrom zero not one!
*/
for (var index = 0; index < myFavoriteSongs.length;index++)
{
    var favoriteSong =myFavoriteSongs[index];
    console.log((index + 1) + \") \" +favoriteSong + \"\n\");
}
/*
    Now it's your turn. print out the arrayof the colors in a rainbow using a for loop
*/
/*
    Here is an example of adding an eventlistener to my button. Notice how the inline-function has a
    single line of coded within the {}:console.log(\"I was clicked!\");
*/
var myButton = document.getElementById(\"myButton\");
myButton.addEventListener(\"click\", function () {console.log(\"Iwas clicked!\");} );
/*
    Now it's your turn to do something whenyour button is clicked. I've created the variable \"yourButton\" foryou already
*/
var yourButton = document.getElementById(\"yourButton\");