Skip to content

Instantly share code, notes, and snippets.

@andygimma
Created November 20, 2015 20:54
Show Gist options
  • Save andygimma/1914e5b6ccfba2d46a08 to your computer and use it in GitHub Desktop.
Save andygimma/1914e5b6ccfba2d46a08 to your computer and use it in GitHub Desktop.
var sites = {
A1: {
name: "Wendy Williams",
city: "Houston",
work_type: "flood",
urgency: 5
},
A2: {
name: "Jello Biafra",
city: "Houston",
type: "wind",
urgency: 3,
},
A3: {
name: "Joey Ramone",
city: "New York",
work_type: "electrical",
urgency: 4,
}
}
// The sites are called A1, A2, etc because that's how we name them in my app
// I want you to create a search function, called typeSearch, that returns an object if 'type' matches the parameter sent to the function.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment