Skip to main content
3 of 3
added 320 characters in body

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!