---
layout: "default"
title: "Bool"
description: "Swift documentation for 'Bool': A value type whose instances are either true or false."
keywords: "Bool,struct,swift,documentation,encode,hash,random,random,toggle,customMirror,customPlaygroundQuickLook,description,hashValue"
root: "/v4.2"
---

<div class="intro-declaration"><code class="language-swift">struct Bool</code></div>

<div class="discussion comment">
    <p>A value type whose instances are either <code>true</code> or <code>false</code>.</p>

<p><c