---
title: "init(booleanLiteral:)"
framework: swift
role: symbol
role_heading: Initializer
path: "swift/expressiblebybooleanliteral/init(booleanliteral:)"
---

# init(booleanLiteral:)

Creates an instance initialized to the given Boolean value.

## Declaration

```swift
init(booleanLiteral value: Self.BooleanLiteralType)
```

## Parameters

- `value`: The value of the new instance.

## Discussion

Discussion Do not call this initializer directly. Instead, initialize a variable or constant using one of the Boolean literals true and false. For example: let twasBrillig = true In this example, the assignment to the twasBrillig constant calls this Boolean literal initializer behind the scenes.
