Discuss / JavaScript / 增加名单也可

增加名单也可

Topic source

离支

#1 Created at ... [Delete] [Delete and Lock User]

var names = arr.slice(0 , arr.length - 1).join(',');

var lastName = arr[arr.length - 1];

console.log(`欢迎${names}和${lastName}同学!`);


  • 1

Reply