I want to call a function inside that same function and outside also. How does it in javascript?
Js:
someFunction(function repeat(result) {
document.body.innerHTML += '<br>' + result.winner;
if (result.winner) {
someFunction(repeat);
}
});
someFunction.repeat();