Function print()
Print with Text
main.dart
After starting, the program prints information to the console from the parentheses of the print()
function.
If we want to output the text to the console, we must write it inside the quotation marks.
main.dart
Rules
- The text can be written in single quotation marks:
- The text also can be written in double quotation marks:
- The main thing is that quotation marks are the same on both sides;
- We will get an error if we try to output the text without quotes.
Print with Numbers
Working with numbers is different from working with text. Suppose you want to display numbers. Since we work with number values, you don't need to use quotes (" "
or ' '
).
main.dart
We will consider working with numbers and mathematical operations in detail in Chapter 5.
¿Todo estuvo claro?
Contenido del Curso
Introduction to Dart
1. First Acquaintance with Dart
2. Variables and Data Types
3. Conditional Statements
4. List and String
Introduction to Dart
Function print()
Print with Text
main.dart
After starting, the program prints information to the console from the parentheses of the print()
function.
If we want to output the text to the console, we must write it inside the quotation marks.
main.dart
Rules
- The text can be written in single quotation marks:
- The text also can be written in double quotation marks:
- The main thing is that quotation marks are the same on both sides;
- We will get an error if we try to output the text without quotes.
Print with Numbers
Working with numbers is different from working with text. Suppose you want to display numbers. Since we work with number values, you don't need to use quotes (" "
or ' '
).
main.dart
We will consider working with numbers and mathematical operations in detail in Chapter 5.
¿Todo estuvo claro?