charAt
'0123'.charAt('1') // -> '1'
'0123'.charAt(1.45) // -> '1'
'0123'.charAt(true) // -> '1'
'0123'.charAt() // -> '0'
'0123'.charAt(NaN) // -> '0'
'0123'.charAt(-1) // -> ''
Number.prototype.charAt = String.prototype.charAt
NaN.charAt() // -> 'N'
Boolean.prototype.charAt = Boolean.prototype.charAt
true.charAt() // -> t
Funny snippet from Räphael’s creator Dmitry Baranovskiy’s talk Zen of JavaScript
Here is the part where he talks about this: