O'Reilly logo

Dart for Absolute Beginners by David Kopec

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

CHAPTER 5

image

Functions

You may remember the concept of functions from a math course. Or, perhaps they are a completely foreign concept to you. Either way, they are one of the basic units used for organizing source code. In some programming languages, functions go by another name, such as subroutines or procedures. In Dart, functions can stand on their own or be a part of objects. In the latter case, they are known as methods and are covered in Chapter 10.

What Is a Function?

Functions are not strictly necessary to write programs. Indeed, other than using the main() function as an entry point for our programs, we have not actually been actively creating ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required