Function name type inside javascript