Skip to content

Instantly share code, notes, and snippets.

@stanwilsonjr
Created December 19, 2012 16:00
Show Gist options
  • Save stanwilsonjr/4337805 to your computer and use it in GitHub Desktop.
Save stanwilsonjr/4337805 to your computer and use it in GitHub Desktop.
var animalObject = { elephant : "Elephant" , lion : "Lion" , tiger : "Tiger",giraffe :"Giraffe" };
var animalArray = [ "Giraffe", "Lion" ,"Elephant" , "Tiger" ];
/* 1: Return Elephant from animalArray in an alert */
/* 2: Return Elephant from animalObject in an alert */
/* 3: Create a function that accepts animal as an argument and returns that animal from animalArray in an alert and call it */
/* 4: Create a function that accepts animal as an argument and returns that animal from animalObject in an alert and call it */
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment