Afrikaans
Akan
Albanian
Amharic
Arabic
Armenian
Azerbaijani
Basque
Belarusian
Bemba
Bengali
Bihari
Bosnian
Breton
Bulgarian
Cambodian
Catalan
Cebuano
Cherokee
Chichewa
Chinese (Simplified)
Chinese (Traditional)
Corsican
Croatian
Czech
Danish
Dutch
English
Esperanto
Estonian
Ewe
Faroese
Filipino
Finnish
French
Frisian
Ga
Galician
Georgian
German
Greek
Guarani
Gujarati
Haitian Creole
Hausa
Hawaiian
Hebrew
Hindi
Hmong
Hungarian
Icelandic
Igbo
Indonesian
Interlingua
Irish
Italian
Japanese
Javanese
Kannada
Kazakh
Kinyarwanda
Kirundi
Kongo
Korean
Krio (Sierra Leone)
Kurdish
Kurdish (Soranรฎ)
Kyrgyz
Laothian
Latin
Latvian
Lingala
Lithuanian
Lozi
Luganda
Luo
Luxembourgish
Macedonian
Malagasy
Malay
Malayalam
Maltese
Maori
Marathi
Mauritian Creole
Moldavian
Mongolian
Myanmar (Burmese)
Montenegrin
Nepali
Nigerian Pidgin
Northern Sotho
Norwegian
Norwegian (Nynorsk)
Occitan
Oriya
Oromo
Pashto
Persian
Polish
Portuguese (Brazil)
Portuguese (Portugal)
Punjabi
Quechua
Romanian
Romansh
Runyakitara
Samoan
Scots Gaelic
Serbian
Serbo-Croatian
Sesotho
Setswana
Seychellois Creole
Shona
Sindhi
Sinhalese
Slovak
Slovenian
Somali
Spanish
Spanish (Latin American)
Sundanese
Swahili
Swedish
Tajik
Tamil
Tatar
Telugu
Thai
Tigrinya
Tonga
Tshiluba
Tumbuka
Turkish
Turkmen
Twi
Uighur
Ukrainian
Urdu
Uzbek
Vietnamese
Welsh
Wolof
Xhosa
Yiddish
Yoruba
Zulu
In the last section, we wrote out our first tiny little dart program, this is essentially a hello
world program and I know hello worlds are very boring and you don't really like to see them inside of
courses.
But in this case, we can actually learn a lot about the programming language by tearing apart this
snippet of code line by line.
And so that's exactly what we're going to do in this section.
We're going to start with this first line of code right here, and we're going to tear this thing apart
line by line or piece by piece and get a better idea of what's going on behind the scenes.
So let's get to it.
In this diagram right here, I took that line and put it into a series of different blue boxes, so
we're going to talk about every little chunk inside of here, starting off with the word vare on the
far left hand side, the word vare declares a new variable.
This is one way of many in which we can declare a new variable inside of Dart.
And we'll very shortly see some of the other ways in which we can declare a variable rate.
After that, we put down the variables name.
In this case, the name of the variable was simply name, just like many other programming languages.
We can then later on reference this variable by simply writing out the word name.
We then placed our equal sign and then on the right hand side that we had a reference to the function,
my name, the set of parentheses after my name invokes that function or it runs it returns a value and
then that value gets assigned to the variable name right here.
One thing I want to point out in particular is the semicolon at the end of this line.
So Dart requires us to make use of semicolons.
They're not optional as they are inside of JavaScript.
Now, the last thing I want to mention about this line of code right here is that there's actually two
separate things occurring on the left hand side of the equals sign.
We have VARE and then name.
These two words right here form a step that we refer to as variable declaration, variable declaration
is the process of actually creating this variable and telling darte, hey, here's a new variable and
here's its name.
Then with the equal sign and the call to the mining function, we have a second step referred to as
variable initialization, initialization is the process of assigning a value to a variable that has
been declared.
So, again, two separate steps here.
The first one is variable declaration and the second is initialization.
This might seem like a very small distinction to make, but later on, as we start to go deeper into
darte, the difference between declaration and initialization is going to start to get very important.
OK, so we just took apart one line of code, let's continue in the next section and we're going to
continue looking at this little snippet right here.
So quick break and I'll see you in just a moment.
Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.