JSFiddle - React, Tailwind, and code Playground
HTML
<span id="1234"></span>
JavaScript
function add ( a ) {
if ( this.x )
{
return this.x + ( a ? a : 10 );
}
else{
this.x = a;
return add;
}}
document.getElementById ('1234').innerHTML = add(20)(10)