🔧 Dart 101: Parameter vs Argument
Nachrichtenbereich: 🔧 Programmierung
🔗 Quelle: dev.to
While declaring a function a parameter is passed down as a placeholder for the function's input. If a function needs multiple parameters for multiple inputs, the parameters must be comma separated.
In the following code block firstName and lastName are the parameters of getFullName function.
String getFullName(String firstName, String lastName) {
return "Full Name: $firstName $lastName";
}
An argument is the actual input which is passed down to a function when the function is called, and in that case the argument replaces the parameter.
In the following code myFirstName and mySecondName are arguments.
void main() {
const myFirstName = "Nabil";
const mySecondName = "Mahmud";
final myFullName = getFullName(myFirstName, mySecondName);
print(myFullName);
}
N.B. A parameter is an abstract or virtual thing, but an argument is a concrete or actual thing.
...
🔧 Dart 101: Parameter vs Argument
📈 46.11 Punkte
🔧 Programmierung
🎥 Angular Dart Analysis (Dart Conference 2018)
📈 28.28 Punkte
🎥 Videos
🎥 Future-istic Sorting with Dart (Dart Conference 2018)
📈 28.28 Punkte
🎥 Videos
🎥 How to get Plushy with Dart (Dart Conference 2018)
📈 28.28 Punkte
🎥 Videos
🎥 The Dart Specification Parser (Dart Conference 2018)
📈 28.28 Punkte
🎥 Videos
🎥 Server-side Dart on Node.js (Dart Conference 2018)
📈 28.28 Punkte
🎥 Videos
🎥 Effective Dart + IntelliJ (Dart Conference 2018)
📈 28.28 Punkte
🎥 Videos
🔧 Dart 101: A Pure Function
📈 24.43 Punkte
🔧 Programmierung
🔧 Dart Functions and Parameter Types — Part 3
📈 23.15 Punkte
🔧 Programmierung
🔧 Terraform For_Each Meta-Argument 101
📈 22.96 Punkte
🔧 Programmierung
🔧 Terraform Count Meta-Argument 101
📈 22.96 Punkte
🔧 Programmierung
📰 Programmiersprache: Dart 2 ist fertig
📈 14.14 Punkte
📰 IT Nachrichten
📰 Google Creates Dart Version of AngularJS
📈 14.14 Punkte
📰 IT Nachrichten