It's another way of writing if (typeof obj.length == 'number')
. Why they do it that way, it's anyone's guess. Probably trying to be clever at the expense of readability. Which is not too uncommon these days, unfortunately...
Although it might be so that it can be compressed more by minifiers (YUI Compressor, Closure Compiler, UglifyJS, etc):
(a.length===+a.length)
vs
(typeof a.length=='number')
Doing it their way would save 5 bytes, each instance.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…