I am trying to call a function from within a class that is created outside of the class,but when I do JavaScript 'thinks' I am trying to write a new function. In the example below I make a class, I define a function(show), then I try to call a function not in the class(outsideFunction) but when I run my code I get an error
function outsideFunction(){
arc(100,75,50,0,2*Math.PI)
}
class example {
show(){
rect(20,20,150,100)
}
outsideFunction();
}
outsideFunctionto run?