The version read-only property of the MIDIPort interface returns the version of the port.
version
MDN Reference