> For the complete documentation index, see [llms.txt](https://docs.angular-package.dev/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.angular-package.dev/sass/list/list.last.md).

# list.last()

The `list.last()` function returns the last element of [`$list`](#usdlist).

{% code lineNumbers="true" %}

```scss
// Sass.
@use 'sass:list';

// The `list.last()` function.
@function last($list) {
  @return list.nth($list, list.length($list));
}
```

{% endcode %}

{% embed url="<https://github.com/angular-package/sass/blob/main/list/_list.last.function.scss>" %}

### Parameters

#### **`$list`**&#x20;

The list to get the last element from.

### Return

The return value is the last element of [`$list`](#usdlist).

## Examples

```scss
// Use.
@use 'angular-package/sass/list';

// Examples.
@debug list.last(('a', 'b', c, d, 2, 4, 5, (a: 1))); // (a: 1)

```
