understanding the return .
what does the return statement really say ?
- $( "li" ).click(function (e){
- $(this).filter(function( index ) {
- return $( "strong", this ).length === 1;
- })
- .addClass('me');
- });
-
does it read as the following ??
if ($( "strong", this ).length === 1){
return true ;
}else {
return false ;
}
also why the "index" parameter on the filter function ??