Skip to main content
4 of 12
added 205 characters in body

Dart

Length 5:

'A$k'

$ is used within Strings for interpolation. In this example if k was a variable with a value of wkward, the full value of the interpolated String would be Awkward.

Length 4:

true

Unlike other languages such as JavaScript, in Dart true is the only value that is true. The same applies to false. Values such as 0, 1, '', null are not truthy.

Length 3:

var

Var allows a variable to refer to any type of object. Tools will attempt to infer the actual type of the object.

Length 2:

{}

Dart supports map literals.

Length 1:

;

Semi-colons are mandatory to terminate a statement.

Factoid: Dart is an optionally typed language, which means you can add types to aid developers and tools, but they have no effect on your program's semantics - it will run the same whether you add types, or don't, or even add incorrect types.