Last active
August 29, 2015 14:25
-
-
Save DiyahM/914da0497239c7fcb423 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//page 3 changes | |
var myList = ['apple', 'orange' 'banana']; | |
var fruit = myList[2]; | |
//page 5 changes | |
//question should change to 'What is the value returned in the above function printFavoriteColor?' | |
//This should be a text answer instead of multiple choice | |
function printFavoriteColor(){ | |
var colors = ['red', 'orange', 'yellow', 'green', 'blue', 'purple']; | |
var randomString = ""; | |
for(var i=0; i<colors.length; i++) { | |
if (colors[i].length < 5) | |
randomString += colors[i]; | |
else if (colors[i].length == 5) | |
randomString += colors[i]; | |
else | |
randomString = colors[i]; | |
} | |
return randomString; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment