为什么这个...
class Person
name: "initial name"
constructor: (@name) ->
class User extends Person
password: "initial password"
f = new User "Felds"
console.log f
console.log "my name is '#{f.name}' and my password is '#{f.password}'"
b = new User "Bob"
b.password = "bob's password"
console.log b
...运行时coffee -p test.coffee | node
输出这个?
{ name: 'Felds' }
my name is 'Felds' and my password is 'initial password'
{ name: 'Bob', password: 'bob\'s password' }
为什么password
房产不显示console.log f
?它存储在哪里以及如何检索?