Skip to content

Instantly share code, notes, and snippets.

@audstanley
Created January 6, 2016 22:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save audstanley/1a026c16341ab9b29b2e to your computer and use it in GitHub Desktop.
Save audstanley/1a026c16341ab9b29b2e to your computer and use it in GitHub Desktop.
wont return the objects in the array
var obj = [ {"username":"audstanleybot"} ];
var newObj = '{"username":"audstanleybot2"}';
function addToObj(anObj) {
return anObj.push(newObj);
}
console.log(addToObj(obj));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment