Nim Language is a statistical typed language which means each variable declared has a type associated with it.
Nim Type inference
Type Inferences is a process of assigning the type of a variable based on the value or expression assigned. Nim Supports Type inference by default.
For example variable can be declared with a type.
var number: int
or
var number: int = 12
number variable declared with type and also initialized with a value
Let’s see another example without declaring a datatype.
var number = 12
var name = "Admin"
The above example does not declare the type but the compiler inferred the type from the right-hand value.