1.!(变量名):
var first = ‘abc’;
console.log( !first);
结果为flase!
2. !!(变量名):
var second=‘abc’;
console.log( !second);
结果为true!
关于Boolean类型的转换
最新推荐文章于 2024-01-31 23:50:22 发布
1.!(变量名):
var first = ‘abc’;
console.log( !first);
结果为flase!
2. !!(变量名):
var second=‘abc’;
console.log( !second);
结果为true!