How do you get the length of a string?

后端 未结 10 1569
星月不相逢
星月不相逢 2020-12-12 12:43

How do you get the length of a string in jQuery?

10条回答
  •  难免孤独
    2020-12-12 13:17

    You don't need to use jquery.

    var myString = 'abc';
    var n = myString.length;
    

    n will be 3.

提交回复
热议问题