$\quad$If a smooth surface $S$ is defined by $g(x,y,z)=0$, then recall that a unit normal is $$\mathbf{n}=\dfrac{1}{\|\nabla g\|}\nabla g,\tag{9}$$ where $\nabla g=\dfrac{\partial g}{\partial x}\mathbf i + \dfrac{\partial g}{\partial y}\mathbf j + \dfrac{\partial g}{\partial z}\mathbf k$ is the gradient of $g$. If $S$ is defined by $z=f(x,y)$, then we can use $g(x,y,z)=z-f(x,y)=0$ or $g(x,y,z)=f(x,y)-z=0$ depending on the orientation of $S$.
$\quad$As we shall see in the next example, the two orientations of an orientable closed surface are outward and inward.
The author specifies that $g$ either has $z$ or $-z$ depending on the orientation of the surface but doesn't specify which belongs to which orientation.
The right-hand rule as a guide for orientation works pretty well here. If the gradient has positive $z$ component then your hand rotates in a counterclockwise manner, whereas if it has a negative $z$ component it rotates in a clockwise.
The sign will be determined by what he mentioned. The case $g(x,y,z) = z-f(x,y)$ gives the counterclockwise orientation, where $g(x,y,z) = f(x,y) -z$ gives the clockwise.