Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8823933
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T06:28:54+00:00 2026-06-14T06:28:54+00:00

I am trying to get Step.js library working properly with coffee-script. I am quite

  • 0

I am trying to get Step.js library working properly with coffee-script. I am quite new to coffee but here is my attempt:

setTimeout(
  =>
    console.log("step 1 at #{new Date}")
    setTimeout(
      =>
        console.log("step 2 at #{new Date}")
        setTimeout(
          =>
            console.log("step 3 at #{new Date}")
          10000
        )
      10000
    )
  10000
)

# step 1 at Tue Nov 13 2012 13:18:51 GMT-0600 (CST)
# step 2 at Tue Nov 13 2012 13:19:01 GMT-0600 (CST)
# step 3 at Tue Nov 13 2012 13:19:11 GMT-0600 (CST)

should be the same as:

step(
  ->
    setTimeout(
      =>
        console.log("step 1 at #{new Date}")
        this(null)
      10000
    )
  ->
    setTimeout(
      =>
        console.log("step 2 at #{new Date}")
        this(null)
      10000
    )
  ->
    setTimeout(
      =>
        console.log("step 3 at #{new Date}")
        this(null)
      10000
    )
)

# step 1 at Tue Nov 13 2012 13:12:04 GMT-0600 (CST)
# step 2 at Tue Nov 13 2012 13:12:04 GMT-0600 (CST)
# step 3 at Tue Nov 13 2012 13:12:04 GMT-0600 (CST)

As you can see from the above example step is executing all the steps at the same time instead of doing them one at a time like it is supposed to. I am not too sure why that is right now.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T06:28:55+00:00Added an answer on June 14, 2026 at 6:28 am

    CoffeeScript implicitly adds a return in front of the last expression in a function. This is a problem with Step, which assumes that if you return anything, that step is synchronous.

    The solution is to add an explicit return at the end of each step function:

    step(
      ->
        setTimeout(
          =>
            console.log("step 1 at #{new Date}")
            this(null)
          10000
        )
        return
      ->
        setTimeout(
          =>
            console.log("step 2 at #{new Date}")
            this(null)
          10000
        )
        return
      ->
        setTimeout(
          =>
            console.log("step 3 at #{new Date}")
            this(null)
          10000
        )
        return
    )
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

On step 2 of my step by step jquery form I'm trying to get
(Step 1) I'm trying to get openCV to run from python on my mac
I'm trying to use Ruby's IMAP library to get a list of all the
I'm trying to get through this tutorial: http://static.springsource.org/docs/Spring-MVC-step-by-step/ Unfortunately, I got stuck on chapter
I'm trying to get frequency from iPhone / iPod music library for a spectrum
I'm trying hard here to figure out how to do a JSONP request, but
I am trying to get Slickedit working with the Qt framework so that I
I'm trying to understand how to get my iPhone application working with RegexKitLite ,
I am trying to load some doctrine extensions but I get all sort of
im trying to get familiar with the new JBoss 6 and having a really

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.