Skip to content

Instantly share code, notes, and snippets.

@Philocoder93
Created December 21, 2016 22:00
Show Gist options
  • Select an option

  • Save Philocoder93/2c29130eeb45340091797c3e53f8e78c to your computer and use it in GitHub Desktop.

Select an option

Save Philocoder93/2c29130eeb45340091797c3e53f8e78c to your computer and use it in GitHub Desktop.
var contacts = ["Matt Smith", "Sam Davis", "Ashley Jones"];
var findContact = function(index) {
var get = contacts[index];
return get;
};
var addContact = function(name) {
contacts.push(name);
};
var updateLastContact = function(newName) {
var long = contacts.length;
contacts[long - 1] = newName;
return contacts;
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment