Functional programming and object-oriented programming concepts can be best understood by typed languages, or the Dart programming language.
Dart is a programming language created by Google, and it is a Typed programming language.
Dart is simple and has helped me understand the concept of Functional and Object-Oriented Programming languages.
JavaScript has been my primary language for decades. Both in frontend and backend. It isn't quite long. I started using Typescript (.ts) in JavaScript.
Learning Dart has opened my eyes to how awesome typed languages are 👌.
Dart is a simple and easy language for me to grasp, especially coming from the JavaScript ecosystem. Its syntax is similar, but the native typing differentiates it.
Dart built-in data types are:- - num (int & double)
- - String
- - bool - Boolean
- - List (similar to Array)
- - Record
- - Map
- - Set
- - Function
- - Class
// Variable Declaration
int someValue = 10;
double someValue1 = 2.5;
String someString = "hello world";
// Function Definition
void printSomething() {
print("hello world");
}
// Dart List
List<int> listOfNumbers = [10, 20, 30, 40, 50];
print(listOfNumbers);
// Records (Dart 3+ feature)
(var first, var second, var third) = ("value 1", "value 2", "...");
print((first, second, third));
// Set
Set<String> setSomething = {"set 1", "set 2", "set 3"};
print(setSomething);
// Map
Map<String, String> valueSomething = {
"key": "value",
"key1": "value 1",
};
print(valueSomething);
// Class Example
class Cookie {
String shape;
Cookie(this.shape);
void baking() {
print("Baking a $shape cookie");
}
}
// Usage
void main() {
printSomething();
Cookie cookie = Cookie("round");
cookie.baking();
}
Dart is a standard programming language for Flutter.
Why Am I Learning Dart.I'm learning Dart to create a secure marketplace for students to buy and sell without the fear of scams.
Watch OUT for my next updates.
Thanks for reading to this point.
Please DON’T forget.I’m Abel Emmanuel, I love building beautiful and solutions products, saas.
Write me a feedback and let's connect on:

