conventional wisdom Jquery: how do I know I have selected etc
<p>Learning jquery right now though I guess this question could be true of any programming language.</p>

<p>I'll ask the question by example:</p>

<p>Currently reading "jquery fundamentals". In the exercises one of the questions is "Figure out how many elements on the page are hidden (hint: .length)."</p>

<p>I've written the code "$('html :hidden').length;"</p>

<p>At this stage I did not know the output. To know if I had written the right code I then wrote:</p>

<p>"var hidden = $('html :hidden').length;</p>

<p>$('h3').html(hidden);"</p>

<p>The h3 changed to "8" which told me that there are 8 hidden elements on the page. Changing the h3 element to find out that I had done something correctly seems a bit crude. Is there a conventional way to know if you have either selected an object correctly or to know a value without actually writing on the html doc?</p>
