What is the use of toggle() method in JQuery?

What is the use of toggle() method in JQuery?

This toggle() method in jQuery is used to check the visibility of the selected HTML elements between the hide() and show() methods, available in jQuery.