The islets of Langerhans are tiny clusters of hormone-making cells inside the pancreas. They are mainly part of the endocrine system, which uses hormones to control processes throughout the body.
These cells release hormones directly into the bloodstream. For example, insulin lowers blood sugar, while glucagon raises it.
The pancreas also belongs to the digestive system because it makes digestive juices. So, the pancreas has both endocrine and digestive roles, but the islets themselves are specifically part of its endocrine function.