Is the Nintendo Switch a handheld or console?

The Nintendo Switch functions as a hybrid, so it can function as both a home console as well as a handheld.

It has a detachable tablet, where you can take it on the go, but can also be connected to a TV like a normal console