AngularJS ng-repeat, comma separated with ‘and’ before the last item
$last is the truthy value.. so it holds either true or false and it doesn’t hold the last element index.. I guess below expression should solve your problem <p><span ng-repeat=”user in Users”> {{user.Username}} {{$last ? ” : ($index==Users.length-2) ? ‘ and ‘ : ‘, ‘}} </span></p> Also make sure that you have the expression with …