code: function gotList(thelist) {
    console.log("List of Serial Ports:");
    // theList is an array of their names
    for (var i = 0; i < thelist.length; i++) {
      // Display in the console
      console.log(i + " " + thelist[i]);
    }
  }
docs: Got the list of ports