Created
December 17, 2019 13:46
-
-
Save stefanledin/adf3a518beed6e66cacbea029993ae20 to your computer and use it in GitHub Desktop.
This file contains 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
var results = [ | |
{ | |
answer: "2", | |
question: "12" | |
}, | |
{ | |
answer: "1", | |
question: "13" | |
}, | |
{ | |
answer: "1", | |
question: "14" | |
}, | |
]; | |
console.log(results.filter(result => result.answer === '1').length); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment