How do I add or remove channels from a list of subscribed channels (multiplexing)?

To subscribe to more channels, just subscribe to one or more channels and they will be added to the current list of subscribed channels.

To unsubscribe from one or more of the currently subscribed channels, us the unsubscribe API and pass the channel(s) that need to be removed.

// comma delimited list of channels
pubnub.unsubscribe({ channel: 'channel2,channel3' });
// channel array
pubnub.unsubscribe({ channel: ['channel6', 'channelABC'] });