js如何判断传入的是数组还是对象

let objClone = Array.isArray(obj) ? [] : {};

猜你喜欢

转载自blog.csdn.net/liulang68/article/details/121271896