Skip to content

Instantly share code, notes, and snippets.

@Sensiblemnd
Created April 14, 2021 14:29
Show Gist options
  • Save Sensiblemnd/0d9a23e14470ede1142be7400493efca to your computer and use it in GitHub Desktop.
Save Sensiblemnd/0d9a23e14470ede1142be7400493efca to your computer and use it in GitHub Desktop.
const theIndex = {
dog: ()=>{console.log("dog")},
cat: ()=>{console.log("cat")},
rabbit: ()=>{console.log("rabbit")}
}
theIndex["rabbit"] ? theIndex["rabbit"]() : console.log("rabbnothing theret")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment