Last active
December 2, 2020 12:51
-
-
Save Thaekeh/509f789b911ad9a744c56b5c506e8197 to your computer and use it in GitHub Desktop.
With this code you can filter an array based on the cooking time.
This file contains 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
computed: { | |
filteredRecipes() { | |
let tempRecipes = this.recipes | |
tempRecipes = tempRecipes.filter((item) => { | |
return (item.cookingTime <= this.maxCookingTime) | |
}) | |
return tempRecipes; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment