I hear a lot that new programming languages are dynamically typed but what does it actually mean when we say a language is dynamically typed vs. statically typed?
Statically typed languages: each variable and expression is already known at compile time.
(int a;
a can take only integer type values at runtime)
Examples: C, C++, Java
Dynamically typed languages: variables can receive different values at runtime and their type is defined at run time.
(var a;
a can take any kind of values at runtime)
Examples: Ruby, Python.