Basics of AppleScript

Size of List

Script [6.6.1]:

set college to {"departments", "classes"}
set listSize to the length of college

Explanation: Here a list named bag contains books and assignments. What if you want to obtain information about the size of the list? It’s simple. Just create a new variable and set it with to the length of listName. Here listSize is the variable which will contain size of list (college) that is 2.

Figure 6.6.1

Figure 6.6.1 Size of List