I am quite new to JS, Pardon me if this is not a valid question.
What will be scope/type (var/let) of variable if I don't define it as var or let?
Say,
function f1(){
a="Sample"
console.log("F1",a);
}
function f2(){
console.log("F2",a);
}
f2();
It Outputs: F2 Sample
I understand function and block level scope of let and var but here how a
is printing, thats confusing.