Skip to content

Instantly share code, notes, and snippets.

@desinas
Last active December 20, 2017 08:01
Show Gist options
  • Save desinas/4d415e0254cb01cb8eed03603d54144d to your computer and use it in GitHub Desktop.
Save desinas/4d415e0254cb01cb8eed03603d54144d to your computer and use it in GitHub Desktop.
Inline Quiz (5-6) of Udacity FEWD
/*
* Programming Quiz: Inline Functions (5-6)
*/
// don't change this code
function emotions(myString, myFunc) {
console.log("I am " + myString + ", " + laugh(2));
}
// your code goes here
// call the emotions function here and pass in an
// inline function expression
emotions("happy", function(times) {
var haTimes= "";
while (times > 0) {
haTimes +="ha";
times --;
}
haTimes= haTimes +"!";
return haTimes;
});
@desinas
Copy link
Author

desinas commented Dec 20, 2017

What Went Well

  • Your code should have an emotions() function
  • Your code should call the emotions() function
  • Your emotions() function call should print the correct output

What Went Wrong: You didn't pass an inline function expression to the emotions() function
Feedback: Not everything is correct yet, but you're close!

@desinas
Copy link
Author

desinas commented Dec 20, 2017

Revision 3 What Went Well

  • Your code should have an emotions() function
  • Your code should call the emotions() function
  • Your emotions() function call should have an inline function expression passed as the second parameter
  • Your emotions() function call should print the correct output

Feedback: Your answer passed all our tests! Awesome job!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment