Skip to content

Instantly share code, notes, and snippets.

@joshuaaguilar20
Created January 25, 2019 19:16
Show Gist options
  • Save joshuaaguilar20/7299613333ca46523df8a868c015843f to your computer and use it in GitHub Desktop.
Save joshuaaguilar20/7299613333ca46523df8a868c015843f to your computer and use it in GitHub Desktop.
//String Literal Teaching and While Loops/Switch Statement
//string literals
function wordBlanks(myNoun, myAdjective, myVerb, myAdverb) {
// Your code below this line
var result = "";
result = `The ${arguments[0]} was ${myAdjective} and he ${myVerb} very ${myAdverb}`;
// Your code above this line
return result;
};
// Change the words here to test your function
var variable = 'callWordBlanks'
switch(variable) {
case 'Oranges':
console.log('Did the orange function')
break;
case 'callWordBlanks':
wordBlanks("dog", "big", "ran", "quickly");
break;
default:
console.log('does this right here does not meet case')
}
var i = 0;
do{
i++;
var test;
console.log('Loop')
if(i < 10){
test = false
}else{
test = true
}
}
while(test);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment