JavaScript ES5ES6 ES5, 2123 1517 12
12 bytes
`${!3}`[3-2]
17 bytes: (typeof!3)[2- -3]
23 bytes: _=()=>(typeof!3)[2+3][2- -3]
Edit 05/10/2016:
Took advantage of templating strings, as well as boolean coercion and string/array indexing... Also realized my previous code used (typeof!+
, I could always salvage 2+3
as 2- -3)[2+3]
at a cost of 2 bytes for each previous example... (Updated code and scores for previous submissions)
Edit 30/08/2016:
I took a different approach, exploiting the fat arrow functions as well as the typeof
return type, which is a string. So converting a number to a boolean was easier then, had to encase it in parentheses before pulling the 5th element of the resulting string...
Edit 30/08/2016: Seems that there was no mention of my answer requiring to be in the form of a function, so I've just stripped the fat arrow function declaration.