Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- let eightGb = phones.filter(function(item, i){
- if(item.ram == '8gb')
- return item;
- })
- console.log(eightGb)
- let eightGb = phones.filter(function(item) {
- return item.ram == '8gb';
- });
- console.log(eightGb);
- let eightGb = phones.filter(({ram}) => ram == '8gb');
- console.log(eightGb);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement