getGamepads

The Navigator.getGamepads() method returns an array of Gamepad objects, one for each gamepad connected to the device.

MDN Reference