Created
March 5, 2017 09:16
-
-
Save Dosant/9e711fe7e82a0517ca5e16b8daa9b5a3 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 articlesService = (function () { | |
var articles = [1,2,3]; | |
function getArticles() { | |
return articles; | |
} | |
function addArticle(article) { | |
articles.push(article); | |
} | |
return { | |
getArticles: getArticles, | |
addArticle: addArticle | |
}; | |
}()); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment