Discuss / JavaScript / 本章练习参考答案~

本章练习参考答案~

Topic source

console.log(`欢迎${arrSorted[0]},${arrSorted[1]},${arrSorted[2]},和${arrSorted[3]}同学!`);

var arrSorted = arr.sort();

console.log(`欢迎${arrSorted[0]},${arrSorted[1]},${arrSorted[2]},和${arrSorted[3]}同学!`);

Up.

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

var arrSorted = arr.sort();

---这步没必要,sort函数会改变arr的值顺序


  • 1

Reply