Find console.log which outputs undefined