I defined function name as _ , defined function fn
function _(){};
function fn(){
try{
console.info(_);
}catch(_){
//
}
return _;
}
fn();
in FF output _(), but IE8 output undefined, why this result?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
EDIT @kevinpeng thanks to updating to question original version
ie7 does not support window.console (I can’t test as i don’t have it)
ie8 supports it console if you open developer tools by F12
in firefox you can use, no problem.
so not to have error in your code:
You can do this, for console.log: