function compareMessageCount(channel1, channel2) {
    /*console.log('In Sortierung Channel 1: ', channel1.messageCount);
    console.log('In Sortierung Channel 2: ', channel2.messageCount);
    console.log('In Sortierung Returnwert: ', channel1.messageCount-channel2.messageCount);*/
    return channel2.messageCount-channel1.messageCount;
  }
/* New: Definition of compare function to compare (sort in descending order) channels according to number of messages 
  in the channel respectively the messageCount attribute of the channel object */
Definition of compare function to compare (sort in descending order) channels according to number of messages
in the channel respectively the messageCount attribute of the channel object
Definition of compare function to compare ( sort in descending order ) channels according to number of messages in the channel respectively the messageCount attribute of the channel object
function compareMessageCount(channel1, channel2) {
    return channel2.messageCount-channel1.messageCount;
  }
function compareMessageCount ( channel1 , channel2 ) { return channel2 . messageCount - channel1 . messageCount ; }
New: Definition of compare function to compare (sort in descending order) channels according to number of messages
in the channel respectively the messageCount attribute of the channel object
New : Definition of compare function to compare ( sort in descending order ) channels according to number of messages in the channel respectively the messageCount attribute of the channel object
/*console.log('In Sortierung Channel 1: ', channel1.messageCount);
    console.log('In Sortierung Channel 2: ', channel2.messageCount);
    console.log('In Sortierung Returnwert: ', channel1.messageCount-channel2.messageCount);*/