Created
September 11, 2022 09:28
-
-
Save NhanKhangg98/0c2deb7780390b1273cd9d81af385609 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
js const preChannel = channels.filter((p) => p.premium);