This might be a very noob question, but I can't seem to find the answer anywhere. Is it possible to make your own function in a component and call it in the same component?
Example:
Class myComponent extends Component{
public function doSomething(){
doThis();
$b = $a + 2;
return $b;
}
function doThis(){
$a = 0;
}
}