Porcupines have long sharp hairs called quills. What is the main function of the quills on the porcupine?

-to find shelter

- to protect itself