为什么我的代码执行错误?
var EventEmitter = require('events'.EventEmitter)
var life = new EventEmitter()
//addEventListener
life.on('qiu', function(who){
console.log('gei ' + who + ' daoshui')
})
life.emit('qiu ', 'nan')
var EventEmitter = require('events'.EventEmitter)
var life = new EventEmitter()
//addEventListener
life.on('qiu', function(who){
console.log('gei ' + who + ' daoshui')
})
life.emit('qiu ', 'nan')
2016-08-18
举报