How to use getSelected() Function in tabs

hello in tabs documentation there is instant member that used to return the selected tab which is getSelected() can anyone please provide me with an example of how to use it because i can’t ??
here is the link of function in documentation :