JSFiddle - React, Tailwind, and code Playground

by Pankaj Sapkal

HTML

<input type='button' value = 'close' onClick = CloseCurrentTab(); />

JavaScript

function CloseCurrentTab(){
				var conf=confirm("Are you sure, you want to close this tab?");
				if(conf==true){
        	console.log('maine agaya');
					close();
				}
        else
        {
        console.log('maine else maine agaya');
        }
			}