Edit in JSFiddle

var foo = function foo(){
    var bar = function bar(){
        document.write(bar.caller === foo); //affiche true
        document.write(arguments.caller); //affiche undefined
    }
    bar();
}
foo();