Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- let recipeBook = (function () {
- class recipeBook{
- constructor(recipes){
- this._recipes = recipes || [];
- }
- addRecipe(recipe){
- this._recipes.push(recipe);
- }
- removeRecipe(id){
- this._recipes.splice(id, 1);
- }
- getRecipes(){
- return this._recipes;
- }
- }
- return recipeBook;
- })();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement