An octopus has a brain. But in a way, it has many brains. Neurons run throughout an octopus’s body, so in a sense, it can think with its arms. If its arm is removed from its body, it can still respond to stimulus, change color, and reach and grab for items.
This poses a challenge to researchers. An octopus can think, but not in the way mammals do. It responds similarly—it can remember specific people, prefer certain types of food, and even plan an escape—but the way its consciousness works is unusual. An octopus’s mind is similar but different.
What does this chapter include?
To start off, you’ll build and extend a class. This will look similar to most
object-oriented languages. After that, you’ll see how classes work under the
how to mask complexity with getters, setters, and generators. Finally, you
will return to common problems with the
this keyword and techniques for