Hi
I think what Im trying to do is possible, just not sure how...
On a button click - Ive created an object, with some properties in it.
If I want to access those properties when clicking another button... how do I do that?
function build() {
var circ = new circle('5');
}
//equation object
function circle(r) {
this.radius = r;
this.area = findArea;
}
function findArea() {
var answer = this.radius * this.radius * 3.14;
return answer;
}
how would I call a function which returns circ.area() on another button click, if the first Button calls build()?