JQuery map items into an array

I have several elements that I just want to pull the text() out of and put into an array.

var my_items = new Array();
my_items = $(".selector").map(function() { return $(this).text(); });

Or you can do it an alternate way:

var my_items = new Array();
$(".selector").each(function() { my_items.push($(this).text()); });


Note: Replies will be formatted with PHP Markdown Extra syntax.

Name: Email (Not Required):
 
Logged IP: 3.145.60.149
To prevent spam please submit by clicking the kitten: