-
-
Save EsteveSegura/395e27432c4bfbb83bcdacafbabb57a7 to your computer and use it in GitHub Desktop.
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
//we create a function to get all the hashtags we want | |
async function getPostsFromHashtags(ig,arrayOfHashtags){ | |
//Create an empty array to store all hashtags | |
let allPosts = [] | |
//We go through the entire list of hashtags and add it to our empty array | |
for(let i = 0 ; i < arrayOfHashtags.length ; i++){ | |
let hashtagActual = await recentHashtagList(ig,arrayOfHashtags[i]) | |
allPosts.push(hashtagActual) | |
} | |
//This line of code aligns all the elements in the same array | |
return [].concat.apply([], allPosts) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment