摘要:        
1. typeof 可以判断数据类型,它返回表示数据类型的字符串(返回结果只能包括number,boolean,string,function,object,undefined);可以使用typeof判断变量是否存在(如if(typeof a!="undefined"){...});Typeof 运    阅读全文
posted @ 2022-12-13 16:14
陈晓猛
阅读(3620)
评论(0)
推荐(0)
        
            
        
        
摘要:        
严格平等 要确定字符串是否相等,可以使用严格相等运算符 。如果字符串不同,则返回,如果字符串相同,则返回 false true const s1 = 'learn'; const s2 = 'today'; console.log(s1 'learn'); // true console.log(s    阅读全文
posted @ 2022-12-13 16:11
陈晓猛
阅读(12964)
评论(0)
推荐(1)
        
            
        
        
摘要:        
首先你需要知道 promise 要用then接收或者async await例如:a() 是一个Promise封装的方法 // 定义一个变量直接a() 赋值给 b let b = this.a() console.log(b) //这里就会返回 Promise {<pending>} 第一种方式 th    阅读全文
posted @ 2022-12-13 16:05
陈晓猛
阅读(686)
评论(0)
推荐(0)
        
            
        
        
摘要:        
问题所在:在代码中将对象与基本类型做比较导致 if( object != '' ) //对象与字符串比较 报错    阅读全文
posted @ 2022-12-13 13:51
陈晓猛
阅读(1957)
评论(0)
推荐(0)
        

浙公网安备 33010602011771号