ITeye博客

JavaScript 或(||)运算符的妙用

何不笑 · 2013-03-21 15:42 · JavaScript · 编程语言 · Markdown

var Book = function(author, title){
    this.author = author || 'no author';
    this.title = title || 'no title';
}

 

评论(0)

暂无评论。

评论功能维护中,当前仅展示历史评论。