// 整型数组
let arr = [57, 15, 61, 655, 1, 512, 165, 12, 32, 24]
console.log(arr)
// 1.取出大于30的数组的个数
// 2.取出所有大于30的数返回数组
let count = arr.filter((item) => item > 30)
console.log(count, count.length)
// 对象数组
let tree = [
{
id: 4,
},
{
id: 7,
},
{
id: 9,
},
{
id: 13,
},
{
id: 1,
},
{
id: 2,
},
]
console.log(JSON.stringify(tree))
// 对齐进行属性ID从大到小排序
tree.sort((fEl, sEl) => sEl.id - fEl.id)
console.log(JSON.stringify(tree))