if((Array.isArray(变量) && 变量.length === 0) || (Object.prototype.isPrototypeOf(变量) && Object.keys(变量).length === 0)){
                alert('该方法判断了{}花括号这种情况!');
}

 

 

参考-https://blog.csdn.net/weixin_33984032/article/details/92285417

相关文章:

  • 2022-12-23
  • 2021-12-01
  • 2022-01-29
  • 2022-12-23
  • 2022-12-23
  • 2021-07-29
猜你喜欢
  • 2022-12-23
  • 2021-05-14
  • 2022-12-23
  • 2022-02-18
相关资源
相似解决方案