Skip to content

cotrIf

Creates an if statement

Aliases:

  • cotrIf
  • ifStatement

cpp

if (condition) {
// Your code here
}

csharp

if (condition) {
// Your code here
}

dart

if (condition) {
// Your code here
}

go

if condition {
// Your code here
}

haskell

if condition
then expression1
else expression2

java

if (condition) {
// Your code here
}

javascript

if (condition) {
// Your code here
}

javascriptreact

if (condition) {
// Your code here
}

kotlin

if (condition) {
// Your code here
}

perl

if (condition) {
# Your code here
}

php

if (condition) {
// Your code here
}

powershell

Terminal window
if (condition) {
# Your code here
}

python

if condition:
# Your code here

r

if (condition) {
# Your code here
}

ruby

if condition
# Your code here
end

rust

if condition {
// Your code here
}

scala

if (condition) {
// Your code here
}

shellscript

Terminal window
if [ condition ]; then
// Your code here
fi

swift

if condition {
// Your code here
}

typescript

if (condition) {
// Your code here
}

typescriptreact

if (condition) {
// Your code here
}