Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var users = []
- var callback = function (snap) {
- users.push(snap.val())
- if (users.length > 10) {
- usersRef.off(‘child_added’, callback);
- }
- }
- usersRef.on(‘child_added’, callback);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement