How can I check if a variable's type is of type Boolean?(如何检查变量的类型是否为Boolean类型?)
I mean, there are some alternatives such as:(我的意思是,有一些替代方案,如:)
if(jQuery.type(new Boolean()) === jQuery.type(variable))
//Do something..
But that doesn't seem pretty to me.(但这对我来说似乎不太好看。)
Is there a cleaner way to achieve this?(有没有更清洁的方法来实现这一目标?)
ask by Matias Cicero translate from so
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…