原文:Why does this function fail to evaluate the data-type of a given argument?
function isDataType(dataType, obj) { return Object.prototype.toString.call(obj) == [object + dataType + ] ; } var arr = []; alert(isDataType("Array", arr)); // alerts false which is false ...