The pancreas has both exocrine and endocrine functions. The exocrine function involves secretion of pancreatic juice containing digestive enzymes to aid in digestion. The endocrine function involves production of hormones like insulin that regulate blood sugar levels. The pancreatic juice is alkaline and bicarbonate-rich to neutralize stomach acid entering the small intestine. Diseases of the pancreas can impair its functions and cause maldigestion and malabsorption.