str.charAt()与str[]的区别

mac2022-06-30  28

  str.charAt():只能显示当前字符,没有则显示空。

 

  str[]:当索引超出当前字符长度时,则显示undefined. 

 

        

转载于:https://www.cnblogs.com/angle-xiu/p/11322997.html

最新回复(0)