Skip to content

cotrFuncArrow

Creates an arrow function (lambda)

Aliases:

  • cotrFuncArrow
  • arrowFunction
  • functionArrow
  • arrowFunc

csharp

Func<parameters, returnType> myFunction = (parameters) => {
// Your code here
};

dart

Type myFunction(parameters) => expression;

java

(parameters) -> returnType {
// Your code here
}

javascript

const myFunction = (parameters) => {
// Your code here
};

javascriptreact

const myFunction = (parameters) => {
// Your code here
};

perl

my_function = ->() {
# Your code here
}

php

myFunction = fn(parameters) => // Your code here;

powershell

Terminal window
{parameters ->
# Your code here
}

python

my_function = lambda parameters: // Your code here

shellscript

Terminal window
# Bash doesn't have arrow functions.

typescript

const myFunction = (parameters): void => {
// Your code here
};

typescriptreact

const myFunction = (parameters): void => {
// Your code here
};