node 版本 v0.10.28 var a = {"1": 40, "2": 20, "3": -10}; var b = {"1": 20, "2": 10, "3": 1}; for (var i = 0; i < 10000; i++) { var id = 1; var score1 = a[3] - b[3]; var score2 = a[1] - b[1]; console.log("score1=" + score1 + " score2=" + score2); var min = Math.min(score1, score2); console.log(min); }