I am reading about filtering values in jQuery, and I passed on this example:
myvalues = $("div.myvalues");
myvalues.filter(function(index){
return !!$(this).val().length;
});
I am wondering what does the !!$(this).val().length;
mean? I know that ! is flipping the operator to false, and !! is flipping it again to true, but what's the idea?