You're viewing the legacy docs. They are deprecated as of May 18, 2016.
These docs are for version 2.4.2 and below of the Javascript SDK. Go to our current docs, or see our Web migration guide.

Version 2.4.2Changelog


Get a Firebase reference for the database location at the specified relative path. The relative path can either be a simple child name (e.g. "fred") or a deeper slash-separated path (e.g. "fred/name/first").

var usersRef = new Firebase('');
var fredRef = usersRef.child('fred');
var fredFirstNameRef = fredRef.child('name/first');
var path = fredFirstNameRef.toString();
// path is now ''