Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
17
Task/Function-definition/Dart/function-definition.dart
Normal file
17
Task/Function-definition/Dart/function-definition.dart
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
main(){
|
||||
print(multiply(1,2));
|
||||
print(multiply2(1,2));
|
||||
print(multiply3(1,2));
|
||||
}
|
||||
|
||||
// the following definitions are equivalent
|
||||
// arrow syntax without type annotations
|
||||
multiply(num1, num2) => num1 * num2;
|
||||
|
||||
// arrow syntax with type annotations
|
||||
int multiply2(int num1, int num2) => num1 * num2;
|
||||
|
||||
// c style with curly braces
|
||||
int multiply3(int num1, int num2){
|
||||
return num1 * num2;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue