SOURCE

function a() {
  var arr  = [];
  if (arr) {
   console.log('OK');
  } else {
    alert('NOOK');
  }

}
a();
console 命令行工具 X clear

                    
>
console