Help me!what is mean "the index position of the element in the set "?

Help me!what is mean "the index position of the element in the set "?

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title></title>
  <!--jQuery1.81-->
    <script type="text/javascript" src="../../js/jquery.min.js"></script>
    <script type="text/javascript">
        $(function () {
            $('input:first').click(function(){
                $("ul li:last").html(function (index, oldhtml) {
                    return "<a href='#'>" + index + "</a>"
                });
                });
        });













    </script>
</head>
<body>
    <ul>
        <li>1</li>
        <li>2</li>
        <li>3</li>
        <li>4</li>
        <li>5</li>
    </ul>
    <input type="button" value="Click"/>
</body>
</html>
why the result of index isn't 4,but 0.