JS内置对象和API了解不深刻的地方记录
1、BigInt
BigInt 数据形式 1n 22n 56n
BigInt(1);//1n
注意事项:BigInt只能和BigInt进行计算;5n/2n=2n 会取整,不会取余数
2、String 上面的API split 、splice 、slice
'123'.split('');//[1,2,3] 字符串转换成数组和join配对
slice(startIndex,endIndex); //不改变原字符串,返回字符串(从startIndex到endIndex-1)
下面这是Array的API,我老记错---我这迷人的脑瓜子
splice(stratIndex,num,'temp');//从startIndex开始,换掉num个字符串,换成'temp'