102
rated 0 times
[
103]
[
1]
/ answers: 1 / hits: 141954
/ 13 Years ago, mon, june 27, 2011, 12:00:00
How can I get the last second item in an array?
For instance,
var fragment = '/news/article-1/'
var array_fragment = fragment.split('/');
var pg_url = $(array_fragment).last()[0];
This returns an empty value. But I want to get article-1
Thanks.
More From » jquery