The function of spinal cord is to transport information between different parts of the nervous system.
Nervous system has two parts:
Central nervous system
Peripheral nervous system.
Central nervous system includes brain. Peripheral nervous system includes spinal cord.
Spinal cord receives nerve impulses from body and transport it to the brain.
It also receives orders in form of nerve impulses which are transported to receptors for response.