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 3 months ago