Notation: $g:2^{[2]}\rightarrow \mathbb{Z}$ what is $2^{[2]}$?

On Pg 28, Question 26 of this book, the author writes

Define $g:2^{[2]}\rightarrow \mathbb{Z}$ by the rule $g(S) = |S|$ where $S$ is any subset of $[2]$. Write $g$ as a set of ordered pairs.

I don't need the answers, just what it means.

-
Generally books tend to have a notation index at the end, where they keep all the notations they use, where they were defined and sometimes a two-words description. –  Asaf Karagila Jul 28 '11 at 22:14
I assume that $[n]$ is the set of positive integers $\{ 1, 2, ... n \}$ and that for $S$ a set, $2^S$ is the set of all subsets of $S$. (The idea being that $|2^S| = 2^{|S|}$.)
I knew the notation for the power set but I hadn't seen $[n]$. Thanks. –  kuch nahi Jul 28 '11 at 22:08
$[n]$ is defined on page 2. –  Jonas Meyer Jul 28 '11 at 22:10
@kuch: then why didn't you ask "what is $[2]$"? –  Qiaochu Yuan Jul 28 '11 at 22:12