摘要:
1 function retBytes(str){ 2 let num=str.length; 3 for(let i=0;i<str.length;i++){ 4 if(str.charCodeAt(i)>255) num++; 5 } 6 return num; 7 } 个人理解:把字节长度都看 阅读全文
posted @ 2020-12-09 21:51
Vuex_Joe
阅读(130)
评论(0)
推荐(0)
摘要:
方法一、constructor 定义:constructor属性返回对创建此对象的数组函数的引用。 现在控制台定义一个空数组和空对象 然后分别输出对应的属性 方法二、instanceof 定义:instanceof运算符,用于检测构造函数的prototype属性是否出现在某个实例对象的原型链中。 方 阅读全文
posted @ 2020-12-09 12:46
Vuex_Joe
阅读(157)
评论(0)
推荐(0)

浙公网安备 33010602011771号