You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
⭐️ This challenge is up for grabs! Claim it by clicking "assign yourself" on the right, under the "Assignees" section for this GitHub issue! You can work on this by yourself or in pairs.
✔️ To complete this challenge: Post a comment at the bottom of this page with some instructions and sample code, so the rest of our team can learn how to use this new Firebase method by reading your comment!
You can edit your comment at any point to update your answer, so you don't have to do these all at once! To edit your comment after you publish it, click the pencil icon in the top right corner of your comment:
❓ If you have any questions, please post a comment at the bottom of this page! (You can also ask us on Slack, but please post a comment here too so we can more easily reference it later.)
The child method lets you access a location in a Firebase database, relative to another location in the database! It's often used along with the remove method -- see "Create an example of the Firebase remove() method".
Your challenge
🏆 The goal: learn how this method works, test it out for yourself, and then post a comment at the bottom of this page with some instructions and sample code to help teach the rest of our team!
Questions to keep in mind:
What does the official documentation say about this method?
When would we need to use this method? What are some example use cases? (Write some sample code for us, please!)
When should we not use this method? Can you think of any scenarios where using this method would cause errors or unintended side effects?
How many inputs does this method require, if any? What data types can the inputs be?
What does this method return as an output, if any? What data type is returned?
If there are different options for inputs, how does this method behave differently depending on the different possible input(s)?
The text was updated successfully, but these errors were encountered:
Firebase says that this returns a reference.
It's like setting a file path, and as you go deeper, you're adding (/) for each accessible child
it's a void function that returns a specified child location.
eg.
var a = firebase.database().ref('Mommy");
var b = a.child('little Bobby');
So "little Bobby" is the child of "Mommy";
You can also do:
var c = a.child("childrenofMommy/little Anne");
So the entire path would be:
a/cihldrenofMommy/littleAnne;
Great examples here, @kammitama5!! One small thing to update in your sample code: since on the first line you set the variable a to point to the "Mommy" path, then at the end you should change it to say the entire path created by a.child("childrenofMommy/little Anne") would actually be "Mommy/childrenofMommy/little Anne"
Quick question too: when you say it's a "void function" what do you mean? It returns an output (the new database location) based on the string provided as input. Not sure if I follow what you meant by void here?
⭐️ This challenge is up for grabs! Claim it by clicking "assign yourself" on the right, under the "Assignees" section for this GitHub issue! You can work on this by yourself or in pairs.
✔️ To complete this challenge: Post a comment at the bottom of this page with some instructions and sample code, so the rest of our team can learn how to use this new Firebase method by reading your comment!
You can edit your comment at any point to update your answer, so you don't have to do these all at once! To edit your comment after you publish it, click the pencil icon in the top right corner of your comment:
![github-edit-comments](https://user-images.githubusercontent.com/1555022/27059741-06de4e70-4f8d-11e7-9076-53de602e5c6a.png)
❓ If you have any questions, please post a comment at the bottom of this page! (You can also ask us on Slack, but please post a comment here too so we can more easily reference it later.)
About the Firebase
child
method📚 Official documentation: Firebase API section on the
child
methodThe
child
method lets you access a location in a Firebase database, relative to another location in the database! It's often used along with theremove
method -- see "Create an example of the Firebase remove() method".Your challenge
🏆 The goal: learn how this method works, test it out for yourself, and then post a comment at the bottom of this page with some instructions and sample code to help teach the rest of our team!
Questions to keep in mind:
The text was updated successfully, but these errors were encountered: