• slice()、substr()、substring()的结果


    >> var str="i love you" 
    >> str.slice(1) 
    " love you" 
    >> str.substr(1) 
    " love you" 
    >> str.substring(1) 
    " love you" 
    >> str.slice(1,4) 
    " lo" 
    >> str.substr(1,4) 
    " lov" 
    >> str.substring(1,4) 
    " lo" 
    

      

  • 相关阅读:
    iOS
    iOS
    iOS
    iOS
    iOS
    iOS
    iOS
    iOS
    iOS
    iOS
  • 原文地址:https://www.cnblogs.com/tgcoy/p/2571019.html
Copyright © 2020-2023  润新知