Hello, I am studying javascript and doing some testing and would like to understand why this form of call generates error.
function test (){
function printA(){
console.log("a");
}
}
test.printA();
Uncaught TypeError: test.printA is not a function
at <anonymous>:1:6
function test (){
function printA(){
console.log("a");
}
printA();
}
test();
a