Pancreas acts as both an endocrine gland and exocrine gland i.e. it is a part of both the hormonal and digestive system of the body respectively.
It secretes hormones insulin and glucagon so it acts as an endocrine gland.
Pancreas also secrete digestive enzymes into the duct (pancreatic duct) which connects pancreas to duodenum, so it is called an exocrine gland.