具体的使用实例如下:
function isUndefined(variable) {
return typeof variable == 'undefined' ? true : false;
}
if(isUndefined(scoreArray['aaa'])) {
alert('该数组尚未定义!');
}function isUndefined(variable) {
return typeof variable == 'undefined' ? true : false;
}
if(isUndefined(scoreArray['aaa'])) {
alert('该数组尚未定义!');
}