---
title: finally
framework: CKTool JS
role: symbol
role_heading: Instance Method
platforms: [cktool js 1.2.15+]
path: cktooljs/cancellablepromise/finally
---

# finally

Tells CancellablePromise what callback to call when the inner promise either succeeds or fails.

## Declaration

```data
CancellablePromise finally(
	Function? onfinally
);
```

## Parameters

- `onfinally`: An optional function CancellablePromise calls when the inner promise succeeds or fails.

## Discussion

Discussion If you provide a function for the onfinally parameter, CancellablePromise calls that function after the promise succeeds or fails.
