Breaking News: Grepper is joining You.com. Read the official announcement!
Check it out

var x=3; var foo={ x:2, //2 baz:{ x:1, //1 bar:function(){ return this.x; //1 } } } var go=foo.baz.bar; console.log(go()+foo.baz.bar())

Dijana Lazic answered on April 18, 2022 Popularity 2/10 Helpfulness 1/10

Contents


More Related Answers

  • if(a=1 && a=2 && a=3){ console.log("true");}
  • if(a=1 && a=2 && a=3){ console.log("true");}
  • (function() { var a = b = 5; })(); console.log(b);
  • (function() { var a = b = 5; })(); console.log(b);
  • function foo(){ console.log(this.bar) } var bar = 'bar1' var o2 = {bar:'bar2',foo:foo} var o3 = {bar:'bar3',foo:foo} foo() o2.foo() o3.foo()
  • if(a=1 && a=2 && a=3){ console.log("true");}
  • if(a=1 && a=2 && a=3){ console.log("true");}
  • (function() { var a = b = 5; })(); console.log(b);
  • Log value of variable

  • var x=3; var foo={ x:2, //2 baz:{ x:1, //1 bar:function(){ return this.x; //1 } } } var go=foo.baz.bar; console.log(go()+foo.baz.bar())

    0
    Popularity 2/10 Helpfulness 1/10 Language javascript
    Link to this answer
    Share Copy Link
    Contributed on Apr 18 2022
    Dijana Lazic
    0 Answers  Avg Quality 2/10


    X

    Continue with Google

    By continuing, I agree that I have read and agree to Greppers's Terms of Service and Privacy Policy.
    X
    Grepper Account Login Required

    Oops, You will need to install Grepper and log-in to perform this action.