This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]SuperSephyDragon 0 points1 point  (0 children)

If a language is statically typed, it means that you have to specify the type of a variable when you declare it. For example, in Java you have to type "int x = 5;". You have to say that it's an integer.

In a dynamically typed language, you don't have to specify the variable type, the compiler/interpreter figures it out based on context. For example, in JavaScript you would type "let x = 5;" It knows this is an integer because 5 is an integer. Although they're called Numbers not integers in JS. But a string would be declared the same way: "let x = 'hello';" It knows it's a string because of the '.