📜  javascript select from array where - Javascript代码示例

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

代码示例1
var numbers = [1, 2, 3, 4, 5];
var filtered = numbers.filter(function(x) { return x > 3; });

// As a JavaScript 1.8 expression closure
filtered = numbers.filter(function(x) x > 3);