What does the "-y" option do in "yum -y update" CentOS?

I have been using centos 7 a few times now. I have used yum to install a lot of packages. Sometimes I see there is a -y flag sometimes I don’t. Can anyone explain what the -y flag does?

-y means yes. The terminal will not ask any questions. All answers will be automatic yes.

If you use the -y option with yum, yum will automatically answer “yes” to any question prompt during the operation. For the example yum -y install httpd, yum may normally ask if you want to follow through with the installation of packages. With -y present, yum automatically answers yes to this question.