Removing elements from html page

remove() returns the entire set of elements that match the selector, not just the set of elements it just removed.

<!DOCTYPE html>
<html>
<head>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js">
</script>
</head>
<body>
	<p>remove me</p>
	<script>
$(function() {
var p = $("p").remove();
console.log(p);
});
</script>
</body>
</html>