Dart is an actively used programming language created in 2011.

 8Years Old 9,291Users 45Jobs

### Example code from the Hello World Collection:

```// Hello world in Dart

main() {
print('Hello world!');
}```

### Example code from Linguist:

```import 'dart:math' as math;

class Point {
num x, y;

Point(this.x, this.y);

num distanceTo(Point other) {
var dx = x - other.x;
var dy = y - other.y;
return math.sqrt(dx * dx + dy * dy);
}
}

void main() {
var p = new Point(2, 3);
var q = new Point(3, 4);
print('distance from p to q = \${p.distanceTo(q)}');
}
```

### Example code from Wikipedia:

```// Import the math library to get access to the sqrt function.
import 'dart:math' as math;

// Create a class for Point.
class Point {

// Final variables cannot be changed once they are assigned.
// Create two instance variables.
final num x, y;

// A constructor, with syntactic sugar for setting instance variables.
Point(this.x, this.y);

// A named constructor with an initializer list.
Point.origin()
: x = 0,
y = 0;

// A method.
num distanceTo(Point other) {
var dx = x - other.x;
var dy = y - other.y;
return math.sqrt(dx * dx + dy * dy);
}

Point operator +(Point other) => new Point(x + other.x, y + other.y);
}