Javascript of property path in object
Please pick a consistent brace style.

i has the connotation of being an integer counter.  I would pick a different variable name for iterating over the properties of an object.

I don't see any need for obj[i] &amp;&amp; in the else if test. 

If you use recursion properly, you shouldn't need to have a third parameter at all.



function findPropPath(obj, name) {
    for (var prop in obj) {
        if (prop == name) {
            return name;
        } else if (typeof obj[prop] == "object") {
            var result = findPropPath(obj[prop], name);
            if (result) {
                return prop + '.' + result;
            }
        }
    }
    return null;    // Not strictly needed, but good style
}

var myObj = {'a': {'b': {'c': {'x': 1, 'y': 2 }}}};
console.log(findPropPath(myObj, 'x'));