File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -909,13 +909,15 @@ <h3>Requesting Access to the MIDI System with System Exclusive Support</h3>
909909 < h3 > Listing Inputs and Outputs</ h3 >
910910 < p > This example gets the list of the input and output ports and prints their information to the console log, using ES6 for...of notation.
911911 < pre class ="code es-code "> function listInputsAndOutputs( midiAccess ) {
912- for (var input in midiAccess.inputs) {
912+ for (var entry of midiAccess.inputs) {
913+ var input = entry[1];
913914 console.log( "Input port [type:'" + input.type + "'] id:'" + input.id +
914915 "' manufacturer:'" + input.manufacturer + "' name:'" + input.name +
915916 "' version:'" + input.version + "'" );
916917 }
917918
918- for (var output in midiAccess.outputs) {
919+ for (var entry of midiAccess.outputs) {
920+ var output = entry[1];
919921 console.log( "Output port [type:'" + output.type + "'] id:'" + output.id +
920922 "' manufacturer:'" + output.manufacturer + "' name:'" + output.name +
921923 "' version:'" + output.version + "'" );
You can’t perform that action at this time.
0 commit comments