Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Function print() | First Acquaintance with Dart
Introduction to Dart

Function print()Function print()

Print with Text

dart

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.

dart

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 ' ').

dart

main.dart

We will consider working with numbers and mathematical operations in detail in Chapter 5.

Find the line of code with the error.

Виберіть правильну відповідь

Все було зрозуміло?

Секція 1. Розділ 3
course content

Зміст курсу

Introduction to Dart

Function print()Function print()

Print with Text

dart

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.

dart

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 ' ').

dart

main.dart

We will consider working with numbers and mathematical operations in detail in Chapter 5.

Find the line of code with the error.

Виберіть правильну відповідь

Все було зрозуміло?

Секція 1. Розділ 3
some-alt