Can digitalWrite be used in Global or Setup?

What do you mean by "In Global"?