JSFiddle - React, Tailwind, and code Playground

HTML

<div>
    <input type="button" value=" Start " onclick="SetValues()" />
</div>

JavaScript

function SetValues() {
 
    var myObj={ 
    a: 10,
    b:this.c,
    c:function() {
    this.b=this.a;
     //alert("a:"+myObj.a);
     alert("in function b:"+myObj.b);
     return this.b;
    }
    }
  
  alert("Out Side b:"+myObj.c());
}