function check() {} if (check() == undefined) { console.log(undefined); } else { console.log("Nothing"); }