how to close the browser tab using javascript code example Example: javascript close current tab window.close();//closes the current browser tab