silverdagger silverdagger - 3 months ago 30
CoffeeScript Question

CoffeeScript require("foo") vs require "foo"

What is the different between

myFoo = require("foo")
# versus
myFoo = require "foo"

In coffeescript.

Answer Source

There is no difference (beyond code style): They result in the exact same Javascript code:

var myFoo;

myFoo = require("foo");
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download