js 判断是否为空对象、空数组

JSON.stringify(obj) === '{}';

JSON.stringify(obj) === '[]'

 https://www.cnblogs.com/xxhuan/p/6582114.html

posted @ 2018-05-16 09:54  GordonDicaprio  阅读(7408)  评论(0编辑  收藏  举报