js/script.js
/* #6 #liking a channel on #click */
6 #liking a channel on #click
6 #liking a channel on #click
function star() {
    $('#channel-star').toggleClass('far fas');
    let appBarClass = $('#channel-star').attr('class');
    currentChannel.starred = (appBarClass == 'fa-star fas' ? true : false);
    let currentChannelStar = '#channels li:contains(' + currentChannel.name + ') .fa-star';
    let starType = currentChannel.starred ? 'fas' : 'far';
    $(currentChannelStar).removeClass('fas far');
    $(currentChannelStar).addClass(starType);
}
function star ( ) { $ ( '#channel-star' ) . toggleClass ( 'far fas' ) ; let appBarClass = $ ( '#channel-star' ) . attr ( 'class' ) ; currentChannel . starred = ( appBarClass == 'fa-star fas' ? true : false ) ; let currentChannelStar = '#channels li:contains(' + currentChannel . name + ') .fa-star' ; let starType = currentChannel . starred ? 'fas' : 'far' ; $ ( currentChannelStar ) . removeClass ( 'fas far' ) ; $ ( currentChannelStar ) . addClass ( starType ) ; }
6 #liking a channel on #click
6 #liking a channel on #click
//current channel star class
 //change channel object property
 //changes the star for the currently selected channel
 //current channel star
 //determine object star type
 //removes previous class on channel star
 //adds new class on channel star
