找不到為什么它會運行 deepEqual 錯誤,不幸的是我只有這個部分錯誤日志文件。(測試代碼不是我的)。聲明: 我們要編寫一個函數 suitTrue,它給定一套花色,返回一個字符串列表,對應于該花色的每張牌作為 truco 牌??ㄆǔㄆ?8 和 9 之外的所有數字。我的代碼:function SuitTrue(suit) { var answer = []; for (var i =1; i<8; i++){ answer.push( i + " of "+ suit); } for(var i = 10; i<=13; i++) { answer.push( i + " of "+ suit); } return answer;}可用的測試錯誤:[ '1 of clubs', '2 of clubs', '3 of clubs', '4 of clubs', '5 of clubs', '6 of clubs', '7 of clubs', '10 of clubs', '11 o deepEqual [ '1 of clubs', '2 of clubs', '3 of clubs', '4 of clubs', '5 of clubs', '6 of clubs', '7 of clubs', '10 of clubs', '11 o
使用 deepEqual 比較數組時出錯。我的錯誤是什么,為什么?
幕布斯6054654
2022-01-07 19:21:46