Skip to main content
added 320 characters in body
Source Link

Javascript - 6 bytes

Usage of the arrow function declaration (as an anonymous function here) and a bitwise "AND" operator

x=>x&x

Try it online!

or alternatively using the bitwise "OR" operator:

x=>x|0

Try it online!

Javascript - 6 bytes

Usage of the arrow function declaration (as an anonymous function here) and a bitwise "AND" operator

x=>x&x

Try it online!

Javascript - 6 bytes

Usage of the arrow function declaration (as an anonymous function here) and a bitwise "AND" operator

x=>x&x

Try it online!

or alternatively using the bitwise "OR" operator:

x=>x|0

Try it online!

added 283 characters in body
Source Link

Javascript - 86 bytes

Usage of the arrow function declaration (as an anonymous function here) and a bitwise "AND" operator

f=x=>x&xx=>x&x

Try it online!

Javascript - 8 bytes

Usage of the arrow function declaration and a bitwise "AND" operator

f=x=>x&x

Javascript - 6 bytes

Usage of the arrow function declaration (as an anonymous function here) and a bitwise "AND" operator

x=>x&x

Try it online!

Source Link

Javascript - 8 bytes

Usage of the arrow function declaration and a bitwise "AND" operator

f=x=>x&x