let result2 = mySet.getCommands();

for (let command of result2) {
    console.log(command.getName());
}

// Returns    
// command1
// command2
// command3
// command1B