📌  相关文章
📜  比较javascript代码示例中的三胞胎hackerrank解决方案

📅  最后修改于: 2022-03-11 15:01:16.001000             🧑  作者: Mango

代码示例1
var result = [];
var aScore = 0,
    bScore = 0;

for (var i = 0; i < a.length; i++) {
    if (a[i] > b[i]) aScore++;
    if (a[i] < b[i]) bScore++;
}
result[0] = aScore;
result[1] = bScore;
return result;