Skip to content

Instantly share code, notes, and snippets.

@ChrisWhealy
Created April 28, 2016 15:44
Show Gist options
  • Save ChrisWhealy/1d31f9a232e83a3a23494734f4e105f8 to your computer and use it in GitHub Desktop.
Save ChrisWhealy/1d31f9a232e83a3a23494734f4e105f8 to your computer and use it in GitHub Desktop.
Mindshift: Part 3, sample 1
// 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