📅  最后修改于: 2022-03-11 15:01:16.052000             🧑  作者: Mango
const collect = require('collect.js');
const collection = collect([1, 2, 3, 4]);
const x = collection.count();
console.log(`Total number of elements are : ${x}`);
// Output: Total number of elements are : 4