Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

JavaScript Gulp Basics Welcome to Gulp.js Create your first gulp task

Michael Lawinger
Michael Lawinger
33,581 Points

Gulp Callback Function Log

I wrote a line that I thought would be right but then it said the second line wasn't passing anymore. I'm trying to accomplish the third line.

The question is: In the 'goodbye' task, create an anonymous callback function as the second parameter. In the body of the function, log the string "goodbye!".

gulpfile.js
var gulp = require('gulp')
gulp.task("goodbye", function(){console.log("goodbye");});
gulp.task("default", ["goodbye"], function(){console.log("goodbye");})

1 Answer

Your answer is nearly correct, however you need to remove the last line of your code, (the default task) and add an exclamation mark to your log. view below

var gulp = require('gulp');
gulp.task("goodbye", function(){ 
  console.log("goodbye!"); 
});

I hope this helps.