Created
December 21, 2016 22:00
-
-
Save Philocoder93/2c29130eeb45340091797c3e53f8e78c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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