Skip to content

Instantly share code, notes, and snippets.

@NhanKhangg98
Created September 11, 2022 09:28
Show Gist options
  • Save NhanKhangg98/0c2deb7780390b1273cd9d81af385609 to your computer and use it in GitHub Desktop.
Save NhanKhangg98/0c2deb7780390b1273cd9d81af385609 to your computer and use it in GitHub Desktop.
const channels = [
{name:'HBO',premium:true},
{name:'LIFE',premium:false},
{name:'Max',premium:true},
{name:'Cooking channel',premium:false},
{name:'WOBI',premium:false}
];
const preChannel = channels.filter(p => p.premium == true);
console.log(preChannel)
@QuocCao-dev
Copy link

js const preChannel = channels.filter((p) => p.premium);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment