JSFiddle - React, Tailwind, and code Playground

by Bharath Kumaar

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)