Skip to main content
Commonmark migration
Source Link

#JavaScript, 6 bytes

JavaScript, 6 bytes

An anonymous function:

n=>n&1

Alternatively with the same length:

n=>n%2

Both will return 0|1 which should fulfill the requirement for truthy|falsey values.

Try both versions online

#JavaScript, 6 bytes

An anonymous function:

n=>n&1

Alternatively with the same length:

n=>n%2

Both will return 0|1 which should fulfill the requirement for truthy|falsey values.

Try both versions online

JavaScript, 6 bytes

An anonymous function:

n=>n&1

Alternatively with the same length:

n=>n%2

Both will return 0|1 which should fulfill the requirement for truthy|falsey values.

Try both versions online

added 62 characters in body
Source Link

#JavaScript, 6 bytes

An anonymous function:

n=>n&1

Alternatively with the same length:

n=>n%2

Both will return 0|1 which should fulfill the requirement for truthy|falsey values.

Try both versions online

#JavaScript, 6 bytes

An anonymous function:

n=>n&1

Alternatively with the same length:

n=>n%2

Both will return 0|1 which should fulfill the requirement for truthy|falsey values.

#JavaScript, 6 bytes

An anonymous function:

n=>n&1

Alternatively with the same length:

n=>n%2

Both will return 0|1 which should fulfill the requirement for truthy|falsey values.

Try both versions online

Source Link

#JavaScript, 6 bytes

An anonymous function:

n=>n&1

Alternatively with the same length:

n=>n%2

Both will return 0|1 which should fulfill the requirement for truthy|falsey values.