In the example above, both secondCarName and thirdCarName are local variables, only accessable within the function.
Note that, though the thirdCarName is declared inside an if-then block, this matters naught.
A gobal variable is visible everywhere. In the example above, this would be firstCarName.
JavaIn contrast, in Java, scope can be within a method (sort of the equivalent of function), but also in block scope.
Therefore, netherlands is only available within the if statement.
With let, it is possible to create a variable that obscures the variable in the higher block. This is in contrast with Java, where a error is thrown during compiling.