js/script.js
/*#channels#switcher switchChannel() writes new channel name & location, as a link, to app bar and logs changes.

*/
channels#switcher switchChannel() writes new channel name & location, as a link, to app bar and logs changes.
channels#switcher switchChannel () writes new channel name & location as a link to app bar and logs changes .
function switchChannel(channelName) {
    console.log('Tuning into channel', channelName);
    document.getElementById('appbarchannelname').innerHTML = channelName;
    document.getElementById('appbarchannelloclink').innerHTML = 'upgrading.never.helps';
    document.getElementById('appbarchannelloclink').href = 'https://map.what3words.com/upgrading.never.helps';
}
function switchChannel ( channelName ) { console . log ( 'Tuning into channel' , channelName ) ; document . getElementById ( 'appbarchannelname' ) . innerHTML = channelName ; document . getElementById ( 'appbarchannelloclink' ) . innerHTML = 'upgrading.never.helps' ; document . getElementById ( 'appbarchannelloclink' ) . href = 'https://map.what3words.com/upgrading.never.helps' ; }
channels#switcher switchChannel() writes new channel name & location, as a link, to app bar and logs changes.
channels#switcher switchChannel () writes new channel name & location as a link to app bar and logs changes .
/*1 Pt. New channel name is logged to console.
     */ /*1 Pt. Clicking channel name in list, sets same channel name in app bar.
     */ /*Upgrade the function to also change the app bar’s #location. After clicking on a channel the location should change to ‘upgrading.never.helps’ . . Make sure the location is a hyperlink and someone who clicks on the new location is directed to the corresponding w3w site. */