2024-03-04 19:03:46 +08:00
|
|
|
// js
|
|
|
|
import 'dart:js' as js;
|
|
|
|
|
2024-03-04 12:29:26 +08:00
|
|
|
void main() {
|
|
|
|
print("Hello, World!");
|
|
|
|
var a = "Hello, World!";
|
|
|
|
for (var i = 0; i < 10; i++) {
|
|
|
|
a += " " + i.toString();
|
|
|
|
}
|
|
|
|
var b = 12242424242424;
|
|
|
|
for (var i = 0; i < 10; i++) {
|
|
|
|
b += b*i;
|
|
|
|
}
|
2024-03-04 19:03:46 +08:00
|
|
|
// js sleep
|
|
|
|
Future.delayed(Duration(milliseconds:1000)).then((value){
|
|
|
|
print("延时1秒执行 then ");
|
|
|
|
print(value);
|
|
|
|
});
|
2024-03-04 12:29:26 +08:00
|
|
|
print(a);
|
|
|
|
}
|