📜  计数 javascript 代码示例

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

代码示例1
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