Dart (programming language): Difference between revisions

Content deleted Content added
fixed formatting issues caused by previous revision
m moved for-loop example
Line 208:
void main() {
print('Hello, World!');
</syntaxhighlight>
 
A simple [[for-loop]]:<ref>{{Cite web | title=Loops in Dart {{!}} Fluter World {{!}} Dart and Flutter Tutorials | url=https://www.flutterworld.tech/tutorials/dart-tutorials/dart-basics/loops-in-dart/#for-loop}}</ref>
 
<syntaxhighlight lang="dart">
void main() {
for (var i = 1; i <= 10; i++) {
print(i);
}
}
</syntaxhighlight>
Line 274 ⟶ 284:
var distance = p1.distanceTo(p2);
print(distance);
</syntaxhighlight>
 
A simple [[for-loop]]:<ref>{{Cite web | title=Loops in Dart {{!}} Fluter World {{!}} Dart and Flutter Tutorials | url=https://www.flutterworld.tech/tutorials/dart-tutorials/dart-basics/loops-in-dart/#for-loop}}</ref>
 
<syntaxhighlight lang="dart">
void main() {
for (var i = 1; i <= 10; i++) {
print(i);
}
}
</syntaxhighlight>