3 ms·
That's not really a difference between dynamic and statically typed languages — what makes the difference here is having different syntax for variable declarati
by chc 11y ago
That's not really a difference between dynamic and statically typed languages — what makes the difference here is having different syntax for variable declaration and assignment. It so happens that most dynamic languages use the same syntax for both, but there's nothing about separating the two that requires static typing. For example, strict mode JavaScript is a dynamic language that can detect this error, because JavaScript uses var to declare variables.