Variables in Dart
Published in
Apr 7, 2024
Lesson#6
Variable are named memory locations where data is stored.
A variable name can consist of alphabets, numbers, underscore, and $ sign. It must not start with a number.
General syntax of declaring a variable name is:
DataType variableName;
Example:
int x;
Common Data Types
int, double, num, String, Boolean, List, Set, Map, Null
int x = 44;
String name = "Umer";
double pi = 3.14;
bool pass = true;
var abc = "Anything";