Skip to content

Instantly share code, notes, and snippets.

@zrod
Created April 26, 2012 02:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zrod/2495344 to your computer and use it in GitHub Desktop.
Save zrod/2495344 to your computer and use it in GitHub Desktop.
jQuery and pop
var selection = jQuery([ "item1", "item2", "item3" ]),
pop = [].pop;
console.log( pop.call( selection ), selection.length, selection[1] );
// output: "item3" 2 "item2"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment