Lambdas

In this lesson, we'll study a unique category of functions called lambda.

We have to specify function names while creating them. However, there is a special class of functions for which we do not need to specify function names.

Definition

A lambda is an anonymous function that returns some form of data.

Lambdas are defined using the lambda keyword. Since they return data, it is a good practice to assign them to a variable.

Syntax

The following syntax is used for creating lambdas:

Get hands-on with 1200+ tech skills courses.