Tsallaka zuwa abun ciki
Justice Tech School

Dart Comments

Use // for one line, /* */ for several lines and /// for documentation comments that tools turn into docs.

Example
// single line
/* multi
   line */
/// Adds two numbers.
int add(int a, int b) => a + b;
void main() => print(add(1, 2));

Exercise

Doc comment prefix.

 Adds two numbers.

Quiz Test

Which starts a doc comment?

These free lessons are for learning. Join a full course for projects, mentor feedback and a verified certificate.