function Books(title, author, pages, info) {
this.title = title
this.author = author
this.pages = pages
this.info = function() {
return this.title + 'by' + this.author + ',' + this.pages + 'pages' + ',' + 'have read!'
}
}
var books = new Books('Behold a Pale Horse', 'Bill Cooper', 505)
books.info()
- 积分
0 - 话题
0 - 评论
3153 - 注册排名
1351
尝试:
它正在工作,可能您是说它什么都不打印?
尝试