Comments and Documentation
// starts a line comment and /// a documentation comment that tools show.
Example
// simple comment
/// Adds two numbers.
int add(int a, int b) => a + b;
print(add(1, 2));Exercise
Doc comment.
Adds numbersQuiz Test
These free lessons are for learning. Join a full course for projects, mentor feedback and a verified certificate.