function documentation example
Example 1: documenting functions javascript
var toggleVisibility = function (selector, toggle) {
if (!selector) return;
var elem = document.querySelector(selector);
if (!elem) return;
elem.classList.add('active');
if (toggle) {
toggle.classList.add('active');
}
elem.focus()
if (document.activeElement.matches(selector)) return;
elem.setAttribute('tabindex', '-1');
elem.focus();
};
Example 2: python function docstring
def functionName():
"""
This is a function docstring
"""