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

Chris DeMars
Chris DeMars
941 Points

How do I write an anonymous callback function as a second parameter?

I can't figure this out. I am not good with JS.

gulpfile.js
var gulp = require('gulp');

  gulp.task("goodbye", function() {
    console.log("goodbye");
  });

1 Answer

Hey Chris,

You have everything right in your actual code. The only reason why the challenge won't pass is that you're missing an ! in the goodbye string to console.log

var gulp = require('gulp');

  gulp.task("goodbye", function() {
    console.log("goodbye!");
  });
Chris DeMars
Chris DeMars
941 Points

Why do I have to add an exclamation point, wouldn't that make it different from the string?

The string to log out to the console for task 3 is "goodbye!".

Chris DeMars
Chris DeMars
941 Points

SHows how much I pay attention lol

It happens to the best of us, Chris! Happy Coding! =D

Good work