Skip to content

getLength

getLength(needle)

获取数据长度。

返回值:Number

参数说明类型可选值默认值
needle待获取长度对象String | Array | Object
js
console.log(JW.getLength('banana'));
console.log(JW.getLength('banana'.split('')));
console.log(JW.getLength({a: 1, b: 1}));