Created
April 28, 2016 15:44
-
-
Save ChrisWhealy/1d31f9a232e83a3a23494734f4e105f8 to your computer and use it in GitHub Desktop.
Mindshift: Part 3, sample 1
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
// Here are the kids... | |
var kids = [{name:"Abigail", isNaughty:false}, | |
{name:"Ben", isNaughty:false}, | |
{name:"Clara", isNaughty:true}, | |
{name:"David", isNaughty:false}, | |
{name:"Emily", isNaughty:true}, | |
{name:"Fred", isNaughty:false}, | |
{name:"Gloria", isNaughty:false}, | |
{name:"Harry", isNaughty:false}, | |
{name:"Ingrid", isNaughty:true}, | |
{name:"Jack", isNaughty:false}, | |
// Find the good ones... | |
var good_kids = kids.filter(function(k) { | |
return !k.isNaughty; | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment