Argument in a Function: How does a function get its argument in jQuery

Argument in a Function: How does a function get its argument in jQuery

I don't really understand how the following function gets its argument, where from. Is there a calling statement that passes the said argument to to the function.

<script type="text/javascript">
        $(document).ready(function() {
            $("img").filter("[src*=s]").css("border", "thick double red");
            
            var jq = $("[for*=p]" );
            $("label").filter(jq).css("color", "blue");
            
            var elem = document.getElementsByTagName("label")[1];
            $("label").filter(elem).css("font-size", "1.5em");

            $("img").filter(function(index) {
                return this.getAttribute("src") == "peony.png" || index == 4;
            }).css("border", "thick solid red")
        });     
    </script>

Thanks a lot for any enlightening.