I've a person.coffee file that contains the following code
class Person
constructor: (@name) ->
talk: ->
"hello"
module.exports = Person
Now I am trying to use it in app.js
Person = require "./person"
p = new Person "Emma"
console.log p.talk
It prints [Function] in the console. Any idea that what is wrong
Note: I've updated the spaces. Solution: I changed p.talk to p.talk() in app.js and its fixed now.
constructorandtalkequally indented.