Skip to content

cotrVarBool

Creates a boolean variable

Aliases:

  • cotrVarBool
  • variableBool
  • bool
  • boolVariable
  • createBool

cpp

bool myBool = value;

csharp

bool myBool = true;

dart

bool myBool = true;

go

var variableName bool = variableValue

haskell

let myBool = True

java

boolean myBool = true;

javascript

let myBoolean = true;

javascriptreact

let myBoolean = true;

kotlin

var myBool = true

perl

mymyBool = 1;

php

myBool = true;

powershell

Terminal window
myBool =true

python

myBool = True

r

my_bool <- TRUE

ruby

my_bool = true

rust

let myBool = true;

scala

val myBool = true

shellscript

Terminal window
# Bash uses 0 for false and non-zero values for true:
myBoolean=0

swift

var myBool = true;

typescript

let myBoolean: boolean = true;

typescriptreact

let myBoolean: boolean = true;