Hello, something I found while working on this section. In that it states" You should always declare your variables with var
". However, I’ve found that this is not necessarily the case when declaring the variable as a parameter. If I try to use it there I get a “property declaration expected” error. e.g
\*THIS IS GOOD*/
function myFunction(greeting) {
console.log(greeting);
}
myFunction("Hello World");
\*THIS IS BAD*/
function myFunction(var greeting) {
console.log(greeting);
}
myFunction("Hello World");
Is this intended? As in a way for us to kinda come to conclusion on our own or?