Advertisement
Guest User

Untitled

a guest
Sep 15th, 2019
127
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.27 KB | None | 0 0
  1. getMostViews = () => {
  2. let docRef = db.collection('notes');
  3. let firstThree = docRef.orderBy('views', 'desc').limit(3);
  4.  
  5. var query = firstThree.get().then(res =>{
  6. res.forEach(item =>{
  7. console.log(item.data())
  8. })
  9. })
  10.  
  11. }
  12.  
  13. //Work in progress
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement