I was asked this question in an Interview for JS
function display() {
var a = b = 10;
}
display();
console.log('b', typeof b === 'undefined');
console.log('a', typeof a === 'undefined');
My ans was : b false a false but according to the interviewer It should be b false a true
I didn't fully understood him . What should be the correct explanation/answer will be?