[Solved] Why can’t we declare a local variable inside of function parentheses, in JavaScript?
In a comment you’ve clarified: I know [it isn’t allowed] but I just wondered why isn’t it allowed Because until ES2015 it would have been completely redundant and pointless; just having minLength there is sufficient declaration, since JavaScript’s variables and parameters are not typed. Moreover, var would have been misleading, as minLength isn’t a variable, … Read more