How do you get the length of a string in jQuery?
I think you meant to type "You don't need jquery..."
mgroves
2009-06-25 14:02:11
You completely right.
Artem Barger
2009-06-25 14:04:20
Why on earth I was down voted for my answer?
Artem Barger
2009-06-25 14:09:12
I was too, oh the joys of SO.
karim79
2009-06-25 14:12:59
At least people could leave an explanation, what was wrong.
Artem Barger
2009-06-25 14:20:39
I bet that's just competition. :D
Arnis L.
2010-08-24 07:34:25
+3
A:
You don't need to use jquery.
var myString = 'abc';
var n = myString.length;
n will be 3.
Lawrence Barsanti
2009-06-25 14:01:37
+4
A:
jQuery is a JavaScript library.
You don't need to use jQuery to get the length of a string because it is a basic JavaScript string object property.
somestring.length;
legenden
2009-06-25 14:02:30
+1 for including the line 'jQuery is a JavaScript library.' Lots of answers are saying you don't need jQuery, but this may be confusing to a person who thinks that 'jQuery' and 'JavaScript' are two different things.
Grant Wagner
2009-06-25 14:43:53