What You Can Store in Variables

In this chapter, we’ve dealt mostly with storing number values in variables. This section is here to clarify that you can store any kind of value in variables. Figure 4.22 shows a few of the various types that can be stored in variables.

Image

Figure 4.22 A few examples of what you can store in variables.

No limitations restrict the types you can store in global or local variables. Any block that has a left-pointing socket can be stored in these variables.

Component properties, which we used like variables, are built into the components to provide certain functions, so whatever you store in them has to make sense ...

Get Learning MIT App Inventor: A Hands-On Guide to Building Your Own Android Apps now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.