10/03/16 00:03:15
>>106,>>108
これでどうだ!
function test() {
var count = 0;
var check = [
[3],
[9],
[15, 2],
[26, 9]
];
for (var i = 0; i < check.length; i++) {
if (arguments.length == check[i].length) {
for (var j = 0; j < arguments.length; j++) {
if (check[i][j] == arguments[j]) {
count++;
} else {
break;
}
}
}
}
return (count == arguments.length);
}
alert(test(3));
alert(test(3, 5));