CrazyEngineers
  • JavaScript To CoffeeScript Free Online Converter

    Kaustubh Katdare

    Kaustubh Katdare

    @thebigk
    Updated: Oct 25, 2024
    Views: 990
    The Dropbox engineering team used this nice online JavaScript to #-Link-Snipped-# (and vice-versa) converter tool to rewrite entire their browser side codebase from JS to CS. Take a look at #-Link-Snipped-# - the free online tool that lets you convert your code in a jiffy.

    Here's a sample CoffeScript code: -

    days =
      monday: 1
      tuesday: 2
      wednesday: 3
      thursday: 4
      friday: 5
      saturday: 6
      sunday: 7
     
    if yesterday is thursday
      today = friday
      we.excited()
      we.have ball: today
    Which quickly converts to JavaScript -

    var days, today;
     
    days = {
      monday: 1,
      tuesday: 2,
      wednesday: 3,
      thursday: 4,
      friday: 5,
      saturday: 6,
      sunday: 7
    };
     
    if (yesterday === thursday) {
      today = friday;
      we.excited();
      we.have({
        ball: today
      });
    }
    0
    Replies
Howdy guest!
Dear guest, you must be logged-in to participate on CrazyEngineers. We would love to have you as a member of our community. Consider creating an account or login.
Home Channels Search Login Register