loop

for

ๅ–„็”จ Array destructuring ๅฏไปฅ่ฎ“ for loop ๆ›ดๆธ…ๆฅš๏ผŒMap ไนŸๅฏไปฅ็”จ for loop

var findWinners = function(matches) {
    let lookup = new Map()
    for( const [winner, loser] of matches){  }
    for(const [player, lose] of lookup){ }
  
};

findWinners([[1,3],[2,3],[3,6],[5,6],[5,7],[4,5],[4,8],[4,9],[10,4],[10,9]])

Last updated